﻿<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <link rel="Shortcut Icon" href="../../../Content/aecc.ico" type="image/x-icon" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="../../../Content/element-plus/index.css">
  <link rel="stylesheet" href="../../../Content/nprogress/nprogress.min.css">
  <link rel="stylesheet" href="../../../styles/vue-page-common.css">
  <link rel="stylesheet" href="../../../styles/el-table-v2.css">
  <script src="../../../Scripts/hooks/containercheck/close.js"></script>
  <script src="../../../Scripts/Array.prototype.flat.js"></script>
  <script src="../../../Scripts/ResizeObserver.js"></script>
  <script src="../../../Content/vue3/vue.global.prod.js"></script>
  <script src="../../../Content/element-plus/index.full.min.js"></script>
  <script src="../../../Content/element-plus/icons-vue.js"></script>
  <script src="../../../Content/element-plus/zh-cn.min.js"></script>
  <script src="../../../Scripts/axios.min.js"></script>
  <script src="../../../Content/nprogress/nprogress.min.js"></script>
  <script src="../../../Scripts/dayjs.min.js"></script>
  <script src="../../../Scripts/axios.config.js"></script>
  <script src="../../../Scripts/crypto-js.min.js"></script>
  <script src="../../../Scripts/secret.js"></script>
  <title>检验作业</title>
  <style>
    .header {
      color: #fff;
      height: 50px;
      display: flex;
      align-items: center;
      background-image: linear-gradient(to right, #1E9FFF 0%, #68e0cf 100%);
    }

    .el-form-item__label {
      font-weight: normal;
    }

    .header-text {
      font-size: 22px;
      margin-left: 10px;
      font-weight: bold;
    }

    .el-breadcrumb__inner,
    .el-breadcrumb__separator {
      font-size: 16px;
      color: #fff !important;
    }

    .card-header-icon {
      color: #1E9FFF;
      margin-right: 5px;
      font-size: 20px;
    }

    .card-header-text {
      color: #000;
      font-size: 20px;
      font-weight: bold;
    }

    .flush-btn {
      position: absolute;
      right: 0;
      top: 0;
    }

    .el-card__body,
    .el-main {
      padding: 2px;
    }

    .el-submenu__title {
      font-size: 16px;
      font-weight: bold;
    }

    .el-sub-menu__title {
      font-size: 20px;
      color: #1E9FFF;
      font-weight: bold;
    }

    .info-text {
      font-size: 16px;
      height: 36px;
      line-height: 36px;
      margin-left: 10px;
    }

    .info-text-label {
      font-weight: bold;
      padding-right: 10px;
    }

    .el-form--label-top .el-form-item__label {
      padding: 0;
    }

    .el-form-item {
      margin-bottom: 10px;
    }

    .el-tabs__item {
      font-size: 16px;
      font-weight: bold;
    }

    .item {
      display: inline-block;
      text-align: center;
      margin-right: 5px;
    }

    .item-image-container {
      width: 100px;
      height: 40px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .item-text {
      font-weight: bold;
      font-size: 14px;
      color: #1E9FFF;
      margin-bottom: 6px;
    }

    .handle-container {
      border-radius: 4px;
      border: 1px solid #EBEEF5;
      background-image: linear-gradient(to right, #C4E6FF 0%, #fff 100%);
      margin-top: 10px;
      padding: 10px;
      box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
    }

    .item-icon {
      font-size: 35px;
      color: #1E9FFF;
      transition: all 1.5s;
      font-size: 30px;
    }

    .sub-menu-icon {
      font-size: 20px !important;
      transition: all 1.5s;
    }

    .sub-menu-icon:hover {
      transform: scale(1.3) rotate(360deg);
    }

    .item-icon:hover {
      transition: all 0.5s;
      transform: scale(1.3);
    }

    /* 覆盖菜单项样式 */
    .el-menu-item {
      padding-left: 20px !important;
    }

    .el-menu-item.is-active {
      font-weight: bold;
      color: #1E9FFF;
      border: 1px dashed #1E9FFF;
      border-radius: 10px;
      font-size: 16px;
    }

    /* 待报工 */
    #unReport .el-menu-item.is-active {
      color: #67C23A;
      border: 1px dashed #67C23A;
    }

    /* 待检验 */
    #unCheck .el-menu-item.is-active {
      color: #F56C6C;
      border: 1px dashed #F56C6C;
    }

    .el-tree-node__content {
      height: 30px !important;
    }

    .el-tree-node__content:hover {
      font-weight: bold;
      color: #409EFF;
    }

    /* 徽标 */
    .el-badge__content.is-fixed {
      top: 5px;
    }

    /* 首件检验对话框 */
    #firstCheckDialog .el-form--inline .el-form-item {
      margin-right: 16px;
    }
  </style>
</head>

<body>
  <div id="app" v-cloak>
    <!-- 头部标题区域 -->
    <el-row class="header">
      <el-col :span="6">
        <div style="display: flex;align-items: center;position: relative;">
          <el-icon style="font-size: 22px;margin-left: 10px;">
            <home-filled />
          </el-icon>
          <span style="font-size: 20px;margin-left: 5px;font-weight: bold;">中国航发黎阳-制造执行系统</span>
        </div>
      </el-col>
      <el-col :span="14"></el-col>
      <el-col :span="4" style="text-align: right;">
        <span style="margin-right:20px;">{{currentTime}}</span>
      </el-col>
    </el-row>

    <!-- 中间部分 -->
    <el-row :gutter="10" style="margin: 10px 5px;">
      <!-- 左侧 -->
      <el-col :span="6">
        <!-- 个人信息 -->
        <el-card>
          <template #header>
            <div style="display: flex;align-items: center;position: relative;">
              <el-icon class="card-header-icon">
                <Avatar />
              </el-icon>
              <span class="card-header-text">个人信息</span>
              <el-button :icon="'Refresh'" class="flush-btn" plain round @click="handleSearchBtnClick"
                :disabled="pageDisabled">
                刷新
              </el-button>
            </div>
          </template>
          <el-row :gutter="10">
            <el-col :span="8">
              <div v-if="userInfo.userimageurl">
                <el-image style="width: 105px;height: 140px;" :src="userInfo.userimageurl"
                  :preview-src-list="[userInfo.userimageurl]">
                </el-image>
              </div>
              <div v-else>
                <el-image style="width: 105px;height: 140px;border:1px dashed #1E9FFF;">
                </el-image>
              </div>
            </el-col>
            <el-col :span="16">
              <div class="info-text">
                <span class="info-text-label">检验员:</span>{{userInfo.fullname}}
              </div>
              <div class="info-text">
                <span class="info-text-label">所在分厂:</span>{{userInfo.factoryname}}
              </div>
              <div class="info-text" style="color:#E6A23C;">
                <span class="info-text-label">待检任务:</span>{{unCheckContainerDataCount}}
              </div>
              <div class="info-text" style="color:#F56C6C;">
                <span class="info-text-label">超2天未检:</span>{{waitMoreThan2DaysDataCount}}
              </div>
            </el-col>
          </el-row>
        </el-card>

        <!-- 查询区域 -->
        <el-card style="margin-top: 10px;">
          <template #header>
            <div style=" display: flex;align-items: center;position: relative;">
              <el-icon class="card-header-icon">
                <icon-filter />
              </el-icon>
              <span class="card-header-text">检索区域</span>
              <el-button :icon="'Search'" class="flush-btn" plain round @click="handleSearchBtnClick"
                :disabled="pageDisabled">查询</el-button>
            </div>
          </template>
          <el-form style="margin:10px 15px 0 15px;" :label-position="'top'" :disabled="pageDisabled" @submit.prevent>
            <el-form-item>
              <el-autocomplete :prefix-icon="'Search'" v-model.trim="searchObj.containername" placeholder="请输入批次号"
                :trigger-on-focus="false" :fetch-suggestions="searchContainerAsync" :value-key="'containername'"
                :debounce="500" style="width:100%;" clearable @blur="handleContainerBlur"
                @keyup.enter="handleContainerBlur">
              </el-autocomplete>
            </el-form-item>

            <el-form-item>
              <el-autocomplete :prefix-icon="'Search'" v-model.trim="searchObj.productname" placeholder="请输入零件图号"
                :trigger-on-focus="false" :fetch-suggestions="searchProductAsync" :value-key="'productname'"
                :debounce="500" style="width:100%;" clearable>
              </el-autocomplete>
            </el-form-item>

            <el-row :gutter="10">
              <el-col :span="12">
                <el-form-item>
                  <el-input :prefix-icon="'Search'" v-model.trim="searchObj.mfgordername" placeholder="请输入订单号"
                    clearable></el-input>
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item>
                  <el-input :prefix-icon="'Search'" v-model.trim="searchObj.specno" placeholder="请输入工序号" clearable>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </el-card>

        <!-- 待检任务 -->
        <el-card style="margin-top: 10px;">
          <template #header>
            <div style="display: flex;align-items: center;position: relative;">
              <el-icon class="card-header-icon">
                <Flag />
              </el-icon>
              <span class="card-header-text">待检任务</span>
              <el-button :icon="'Refresh'" class="flush-btn" plain round @click="handleSearchBtnClick"
                :disabled="pageDisabled">
                刷新
              </el-button>
            </div>
          </template>

          <el-scrollbar :height="uncheckTaskHeight">
            <el-menu unique-opened ref="menuDataRef" @select="menuSelect" style="margin-top:5px;">
              <!-- 批量加工 -->
              <el-sub-menu index="待检任务">
                <template #title>
                  <el-icon class="sub-menu-icon" style="color:#E6A23C;">
                    <Clock />
                  </el-icon>
                  <el-badge :value="unCheckContainerDataCount" :max="999" type="warning">
                    <span style="font-size: 18px;color:#E6A23C;">待检任务</span>
                  </el-badge>
                </template>
                <el-menu-item v-for="(i,index) in unCheckContainerDataList"
                  :key="i.productbatch + '&' + i.workflowstepid" :label="i.productbatch + '&' + i.workflowstepid"
                  :value="i.productbatch + '&' + i.workflowstepid"
                  :index="'待检任务&' + i.productbatch + '&' + i.workflowstepid">
                  {{i.productbatch}} -【{{i.workflowstepname}}】-【{{i.containertypename}}】
                </el-menu-item>
              </el-sub-menu>
              <!-- 超2天未检 -->
              <el-sub-menu index="超2天未检">
                <template #title>
                  <el-icon style="color:#F56C6C;" class="sub-menu-icon">
                    <warning-filled />
                  </el-icon>
                  <el-badge :value="waitMoreThan2DaysDataCount" :max="1000" type="danger">
                    <span style="font-size: 18px;color:#F56C6C;">超2天未检</span>
                  </el-badge>
                </template>
                <el-menu-item v-for="(i,index) in waitMoreThan2DaysDataList"
                  :key="i.productbatch + '&' + i.workflowstepid" :label="i.productbatch + '&' + i.workflowstepid"
                  :value="i.productbatch + '&' + i.workflowstepid"
                  :index="'超2天未检&' + i.productbatch + '&' + i.workflowstepid">
                  {{i.productbatch}} -【{{i.workflowstepname}}】-【{{i.containertypename}}】
                </el-menu-item>
              </el-sub-menu>
            </el-menu>
        </el-card>
      </el-col>

      <!-- 右侧 -->
      <el-col :span="18">
        <!-- 检验作业区域 -->
        <el-card>
          <template #header>
            <div style="display: flex;align-items: center;">
              <el-icon class="card-header-icon">
                <video-play />
              </el-icon>
              <span class="card-header-text">检验作业</span>
            </div>
          </template>
          <div style="padding: 10px;">
            <!-- 批次信息 -->
            <el-form :inline="true" :disabled="true" :model="containerInfo" :label-position="'top'">
              <el-form-item label="生产订单号">
                <el-input v-model="containerInfo.mfgordername" style="width: 140px;"></el-input>
              </el-form-item>

              <el-form-item label="零件名称">
                <el-input v-model="containerInfo.productdescription" style="width: 120px;"></el-input>
              </el-form-item>

              <el-form-item label="批次卡类型">
                <el-input style="width: 100px;" v-model="containerInfo.containertypename"></el-input>
              </el-form-item>

              <el-form-item label="件号/批次号">
                <el-input style="width: 260px;" v-model="containerInfo.togetherflag"></el-input>
              </el-form-item>

              <el-form-item label="在制">
                <el-input style="width: 60px;" v-model="containerInfo.wipqty"></el-input>
              </el-form-item>

              <el-form-item label="计划">
                <el-input style="width: 60px;" v-model="containerInfo.mfgorderqty"></el-input>
              </el-form-item>

              <el-form-item label="当前工序号">
                <el-input v-model="containerInfo.specno" style="width: 80px;"></el-input>
              </el-form-item>

              <el-form-item label="当前工序">
                <el-input v-model="containerInfo.nowworkflowstepname" style="width: 130px;"></el-input>
              </el-form-item>

              <el-form-item label="计划开始时间">
                <el-input style="width: 100px;" v-model="containerInfo.plannedstartdate"></el-input>
              </el-form-item>

              <el-form-item label="计划完成时间">
                <el-input style="width: 100px;" v-model="containerInfo.plannedfinishdate"></el-input>
              </el-form-item>

              <el-form-item label="派工人">
                <el-input style="width: 80px;" v-model="containerInfo.dispatchEmp"></el-input>
              </el-form-item>

              <el-form-item label="派工时间">
                <el-input style="width: 100px;" v-model="containerInfo.dispatchDate"></el-input>
              </el-form-item>

              <el-form-item label="报工人">
                <el-input style="width: 80px;" v-model="containerInfo.reportEmp"></el-input>
              </el-form-item>

              <el-form-item label="报工时间">
                <el-input style="width: 100px;" v-model="containerInfo.reportDate"></el-input>
              </el-form-item>

              <el-form-item label="检验已等待(天)">
                <el-input style="width: 100px;" v-model="containerInfo.checkwaitdays"></el-input>
              </el-form-item>
            </el-form>

            <el-scrollbar :height="tableHeight">
              <el-table :height="tableHeight" ref="selectedContainerListRef" :data="selectedContainerList" stripe
                border>
                <el-table-column type="index" width="50"></el-table-column>
                <el-table-column type="selection" width="40"></el-table-column>
                <el-table-column label="批次id" prop="containerid" width="100" v-if="false"></el-table-column>
                <el-table-column label="批次号" prop="containername" width="200" show-overflow-tooltip></el-table-column>
                <el-table-column label="在制数" prop="qty" width="100"></el-table-column>
                <el-table-column label="是否关键序" prop="iskey" width="120" show-overflow-tooltip>
                  <template #default="scope">
                    {{scope.row.iskey === '1' ? '是' : '否'}}
                  </template>
                </el-table-column>
                <el-table-column label="是否首检" prop="firstchecknum" width="120" show-overflow-tooltip>
                  <template #default="scope">
                    {{scope.row.firstchecknum === 1 ? '是' : '否'}}
                  </template>
                </el-table-column>
                <el-table-column label="是否工序检" prop="stepchecknum" width="120" show-overflow-tooltip>
                  <template #default="scope">
                    {{scope.row.stepchecknum === 1 ? '是' : '否'}}
                  </template>
                </el-table-column>
                <el-table-column label="是否待处理" prop="ishandle" width="120" show-overflow-tooltip></el-table-column>
                <el-table-column label="超越单" prop="ishavesurpass" width="120" show-overflow-tooltip></el-table-column>
              </el-table>
            </el-scrollbar>
          </div>
        </el-card>

        <!-- 按钮区域 -->
        <div class="handle-container" id="btn-wrapper">
          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleFirstCheckClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <gold-medal />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">首件检验</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleSpecCheckClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <circle-check />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">工序检验</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleFinishCheckClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <Finished />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">成品检验</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleEntrustMeteringClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <Message />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">理化试验申请</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleReworkBtnClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <icon-switch />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">返修返工</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleInputCheckPointResultClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <Edit />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">实测值录入</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleContainerCheckSuspendingClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <Flag />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">检验待处理</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleSurpassbillClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <Paperclip />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">超越单查看</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleDocumentViewClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <Document />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">文档查看</div>
          </div>

          <!-- 流水卡查看 -->
          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleContainerViewClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <Compass />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">流水卡查看</div>
          </div>

          <!-- 工序执行检查 -->
          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleWorkflowStepCheckClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <set-up />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">工序执行检查</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleCheckPointQRCodeClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <icon-picture />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">实测值录入二维码</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleCheckEntrustClick" :disabled="pageDisabled">
                <el-icon class="item-icon">
                  <Operation />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">理化或计量备注</div>
          </div>
        </div>
      </el-col>
    </el-row>

    <!-- 首件检验/工序检验 对话框 -->
    <el-dialog id="firstCheckDialog" v-model="firstCheckDialogVisible" :title="firstCheckDialogTitle" width="95%"
      :draggable="true" align-center :close-on-click-modal="true">
      <el-card style="padding:10px;">
        <template #header>
          <div style="display: flex;align-items: center;position: relative;">
            <el-icon class="card-header-icon" style="color:red !important;">
              <circle-close-filled />
            </el-icon>
            <span class="card-header-text">检验报废信息</span>
          </div>
        </template>
        <!-- 表单 -->
        <el-form :inline="true" :model="checkObjInfo" :label-position="'top'" style="margin:10px;">
          <el-form-item label="生产订单号">
            <el-input v-model="checkObjInfo.mfgOrderName" disabled></el-input>
          </el-form-item>
          <el-form-item label="计划数">
            <el-input v-model="checkObjInfo.planQty" style="width: 80px;" disabled></el-input>
          </el-form-item>
          <el-form-item label="流水卡类型">
            <el-input v-model="checkObjInfo.containertypename" style="width: 120px;" disabled></el-input>
          </el-form-item>
          <el-form-item label="当前工序">
            <el-input v-model="checkObjInfo.workflowstepname" style="width: 120px;" disabled></el-input>
          </el-form-item>
          <el-form-item label="零件图号及版本">
            <el-input v-model="checkObjInfo.productInfo" disabled></el-input>
          </el-form-item>
          <el-form-item label="零件描述">
            <el-input v-model="checkObjInfo.productDesc" disabled></el-input>
          </el-form-item>
          <el-form-item label="首件检验单号">
            <el-input v-model="checkObjInfo.firstCheckBillNo" style="width: 150px;"
              :disabled="!firstCheckInputEnableConfig.firstCheckBillNoEnable"></el-input>
          </el-form-item>
          <el-form-item label="自检合格数">
            <el-input v-model="checkObjInfo.selfCheckQualifiedQty" style="width: 80px;" disabled>
              <template #prefix>
                <el-icon color="#67C23A">
                  <circle-check-filled />
                </el-icon>
              </template>
            </el-input>
          </el-form-item>
          <el-form-item label="自检超差数">
            <el-input v-model="checkObjInfo.selfOutOfToleranceQty" style="width: 80px;" disabled>
              <template #prefix>
                <el-icon color="#E6A23C">
                  <warn-triangle-filled />
                </el-icon>
              </template>
            </el-input>
          </el-form-item>
          <el-form-item label="自检报废数">
            <el-input v-model="checkObjInfo.selfLossQty" style="width: 80px;" disabled>
              <template #prefix>
                <el-icon color="#F56C6C">
                  <circle-close-filled />
                </el-icon>
              </template>
            </el-input>
          </el-form-item>
          <el-form-item label="检验结论">
            <el-select v-model="checkObjInfo.checkResult" placeholder="请选择" style="width: 100px;"
              :disabled="!firstCheckInputEnableConfig.checkResultEnable">
              <el-option key="合格" label="合格" value="合格"></el-option>
              <el-option key="不合格" label="不合格" value="不合格"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="合格数">
            <el-input v-model="checkObjInfo.acceptanceQty" style="width: 80px;"
              :disabled="!firstCheckInputEnableConfig.acceptanceQtyEnable">
              <template #prefix>
                <el-icon color="#67C23A">
                  <circle-check-filled />
                </el-icon>
              </template>
            </el-input>
          </el-form-item>
          <el-form-item label="超差数">
            <el-input v-model="checkObjInfo.defectQty" style="width: 80px;" disabled>
              <template #prefix>
                <el-icon color="#E6A23C">
                  <warn-triangle-filled />
                </el-icon>
              </template>
            </el-input>
          </el-form-item>
          <el-form-item label="报废数">
            <el-input v-model="checkObjInfo.lossQty" style="width: 80px;" disabled>
              <template #prefix>
                <el-icon color="#F56C6C">
                  <circle-close-filled />
                </el-icon>
              </template>
            </el-input>
          </el-form-item>
          <el-form-item label="返修数">
            <el-input v-model="checkObjInfo.reworkQty" style="width: 80px;" disabled>
              <template #prefix>
                <el-icon color="#E6A23C">
                  <warn-triangle-filled />
                </el-icon>
              </template>
            </el-input>
          </el-form-item>
          <el-form-item label="首检批次号">
            <el-input v-model.trim="checkObjInfo.firstCheckContainerNo" clearable style="width: 180px;"
              :disabled="!firstCheckInputEnableConfig.firstCheckContainerNoEnable"></el-input>
          </el-form-item>
          <el-form-item label="检验备注">
            <el-input v-model.trim="checkObjInfo.checkNote" clearable style="width: 180px;"></el-input>
          </el-form-item>
        </el-form>
        <!-- 【报废信息】表格 -->
        <el-table-v2 :columns="columns" :data="lossInfoList" :width="1900" :height="500" fixed border></el-table-v2>
      </el-card>
      <template #footer>
        <el-button type="primary" @click=" handleFirstCheckSaveClick" :icon="'Check'">确认</el-button>
        <el-button @click="firstCheckDialogVisible=false" :icon="'Close'">关闭</el-button>
      </template>
    </el-dialog>

    <!-- 成品检验 对话框 -->
    <el-dialog id="finishCheckDialog" v-model="finishCheckDialogVisible" title="成品检验" width="95%" :draggable="true"
      align-center :close-on-click-modal="true">
      <!-- 表单 -->
      <el-form :inline="true" :model="finishCheckDialogForm" :label-position="'top'" style="margin:10px;">
        <el-form-item label="生产订单号">
          <el-input v-model="finishCheckDialogForm.mfgOrderName" disabled></el-input>
        </el-form-item>
        <el-form-item label="计划数">
          <el-input v-model="finishCheckDialogForm.planQty" style="width: 80px;" disabled></el-input>
        </el-form-item>
        <el-form-item label="流水卡类型">
          <el-input v-model="finishCheckDialogForm.containertypename" style="width: 120px;" disabled></el-input>
        </el-form-item>
        <el-form-item label="当前工序">
          <el-input v-model="finishCheckDialogForm.workflowstepname" style="width: 120px;" disabled></el-input>
        </el-form-item>
        <el-form-item label="零件图号及版本">
          <el-input v-model="finishCheckDialogForm.productInfo" disabled></el-input>
        </el-form-item>
        <el-form-item label="零件描述">
          <el-input v-model="finishCheckDialogForm.productDesc" disabled></el-input>
        </el-form-item>
        <el-form-item label="炉批号">
          <el-input v-model="finishCheckDialogForm.batchNO" disabled></el-input>
        </el-form-item>
        <el-form-item label="提交数">
          <el-input v-model="finishCheckDialogForm.submitQty" style="width: 80px;" disabled></el-input>
        </el-form-item>
        <el-form-item label="合格数">
          <el-input v-model="finishCheckDialogForm.acceptanceQty" style="width: 80px;" disabled>
            <template #prefix>
              <el-icon color="#67C23A">
                <circle-check-filled />
              </el-icon>
            </template>
          </el-input>
        </el-form-item>
        <el-form-item label="报废数">
          <el-input v-model="finishCheckDialogForm.sumLossQty" style="width: 80px;" disabled>
            <template #prefix>
              <el-icon color="#F56C6C">
                <circle-close-filled />
              </el-icon>
            </template>
          </el-input>
        </el-form-item>
        <el-form-item label="超差数">
          <el-input v-model="finishCheckDialogForm.sumDefeatQty" style="width: 80px;" disabled>
            <template #prefix>
              <el-icon color="#E6A23C">
                <warn-triangle-filled />
              </el-icon>
            </template>
          </el-input>
        </el-form-item>
        <el-form-item label="返修数">
          <el-input v-model="finishCheckDialogForm.sumReworkQty" style="width: 80px;" disabled>
            <template #prefix>
              <el-icon color="#E6A23C">
                <warn-triangle-filled />
              </el-icon>
            </template>
          </el-input>
        </el-form-item>
        <el-form-item label="超差审理单">
          <el-input v-model="finishCheckDialogForm.defectBillNo"></el-input>
        </el-form-item>
        <el-form-item label="送检结论">
          <el-input v-model="finishCheckDialogForm.checkResult"></el-input>
        </el-form-item>
        <el-form-item label="其他质量文件">
          <el-input v-model="finishCheckDialogForm.otherQualityResult"></el-input>
        </el-form-item>
        <el-form-item label="量具检查">
          <el-input v-model="finishCheckDialogForm.measureCheck"></el-input>
        </el-form-item>
        <el-form-item label="技术条件">
          <el-input v-model="finishCheckDialogForm.techniqueCondition"></el-input>
        </el-form-item>
        <el-form-item label="附注">
          <el-input v-model="finishCheckDialogForm.checkNote"></el-input>
        </el-form-item>
        <el-form-item label="检验员">
          <el-select v-model="finishCheckDialogForm.checkers" placeholder="请选择" multiple collapse-tags clearable
            style="width: 200px;">
            <el-option v-for="i in finishCheckDialogCheckerList" :key="i.employeeid" :label="i.fullname"
              :value="i.employeeid">
          </el-select>
        </el-form-item>
        <el-form-item label="添加项数">
          <el-input v-model.trim="finishCheckDialogForm.addRowCount" style="width: 100px;"></el-input>
        </el-form-item>
        <el-form-item label="类型">
          <el-select v-model="finishCheckDialogForm.selectType" placeholder="请选择" style="width: 140px;">
            <el-option key="/" label="/" value="/"></el-option>
            <el-option key="合格" label="合格" value="合格"></el-option>
            <el-option key="不合格" label="不合格" value="不合格"></el-option>
            <el-option key="工序保证" label="工序保证" value="工序保证"></el-option>
            <el-option key="夹具保证" label="夹具保证" value="夹具保证"></el-option>
            <el-option key="工艺保证" label="工艺保证" value="工艺保证"></el-option>
            <el-option key="刀具保证" label="刀具保证" value="刀具保证"></el-option>
            <el-option key="一次装夹保证" label="一次装夹保证" value="一次装夹保证"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="&nbsp;">
          <el-button type="primary" @click="finishCheckDialogAddCheckRows" :icon="'Plus'">添加检测内容</el-button>
          <el-button type="success" @click="finishCheckDialogCheckRowsConfirm" :icon="'Check'">修改检测内容</el-button>
          <el-button type="danger" @click="finishCheckDialogCheckRowsClear" :icon="'Delete'">清空检测内容</el-button>
          <el-button type="success" @click="finishCheckDialogCheckerConfirm" :icon="'Check'">确认检验员</el-button>
        </el-form-item>
      </el-form>

      <!-- 行 -->
      <el-row :gutter="10" style="margin: 10px 5px;">
        <!-- 【报废信息】表格 -->
        <el-col :span="17">
          <el-card style="padding:10px;">
            <template #header>
              <span class="card-header-text">报废信息</span>
            </template>
            <el-table-v2 :columns="finishCheckTableColumns" :data="finishCheckLossInfoList" :width="1400" :height="370"
              fixed>
            </el-table-v2>
          </el-card>
        </el-col>

        <!-- 零件尺寸检查表格 -->
        <el-col :span="4">
          <el-card style="padding:10px;">
            <template #header>
              <span class="card-header-text">零件尺寸检查</span>
            </template>
            <el-table height="360" style="margin-top: 10px;" :data="checkContentList" ref="checkContentListRef" stripe
              border>
              <el-table-column type="index" width="50"></el-table-column>
              <el-table-column type="selection" width="40"></el-table-column>
              <el-table-column label="检验内容" prop="checkcontent" show-overflow-tooltip></el-table-column>
              <el-table-column label="检验员id" prop="checkerEmployeeids" v-if="false"></el-table-column>
              <el-table-column label="检验员" prop="checkerFullnames" show-overflow-tooltip></el-table-column>
            </el-table>
          </el-card>
        </el-col>

        <!-- 外观检查表格 -->
        <el-col :span="3">
          <el-card style="padding:10px;">
            <template #header>
              <span class="card-header-text">外观检查</span>
            </template>
            <el-table height="360" style="margin-top: 10px;" :data="appearanceCheckList" ref="appearanceCheckListRef"
              stripe border>
              <el-table-column label="检查项" prop="CheckName" show-overflow-tooltip></el-table-column>
              <el-table-column label="检查结果" prop="CheckResult" width="120" show-overflow-tooltip>
                <template #default="scope">
                  <el-select v-model="scope.row.CheckResult" placeholder="请选择">
                    <el-option :key="'合格'" :label="'合格'" :value="'合格'"></el-option>
                    <el-option :key="'不合格'" :label="'不合格'" :value="'不合格'"></el-option>
                  </el-select>
                </template>
              </el-table-column>
            </el-table>
          </el-card>
        </el-col>
      </el-row>

      <!-- 对话框footer插槽 -->
      <template #footer>
        <el-button type="primary" @click="handleFinishCheckSaveClick" :icon="'Check'">完工</el-button>
        <el-button type="warning" @click="handleInstoreClick">完工并入库</el-button>
        <el-button @click="finishCheckDialogVisible=false" :icon="'Close'">关闭</el-button>
      </template>
    </el-dialog>

    <!-- 入库申请对话框 -->
    <el-dialog id="instoreDialog" v-model="instoreObj.dialogVisible" title="入库申请" width="95%" :draggable="true"
      align-center :close-on-click-modal="true">
      <!-- 表单 -->
      <el-form :inline="true" :rules="instoreObj.formRules" ref="instoreObjFormRef" :model="instoreObj.form"
        :label-position="'top'">
        <el-form-item label="批次号">
          <el-input v-model="instoreObj.form.containername" disabled></el-input>
        </el-form-item>
        <el-form-item label="批次数量">
          <el-input v-model="instoreObj.form.qty" style="width: 80px;" disabled></el-input>
        </el-form-item>
        <el-form-item label="工序">
          <el-input v-model="instoreObj.form.workflowstepname" disabled style="width: 80px;"></el-input>
        </el-form-item>
        <el-form-item label="零件号">
          <el-input v-model="instoreObj.form.productname" disabled></el-input>
        </el-form-item>
        <el-form-item label="零件名称">
          <el-input v-model="instoreObj.form.productdesc" disabled></el-input>
        </el-form-item>
        <el-form-item label="生产订单号">
          <el-input v-model="instoreObj.form.mfgordername" disabled></el-input>
        </el-form-item>
        <el-form-item label="入库类型">
          <el-select v-model="instoreObj.form.instoreType" placeholder="请选择" style="width: 120px">
            <el-option :key="'正常入库'" :label="'正常入库'" :value="'正常入库'"></el-option>
            <el-option :key="'副产品入库'" :label="'副产品入库'" :value="'副产品入库'"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="生产分厂">
          <el-select v-model="instoreObj.form.originalFactorycode" placeholder="请选择" style="width: 100px">
            <el-option v-for="i in instoreObj.factoryList" :key="i.factoryid" :label="i.factoryname"
              :value="i.attributevalue">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="委托单位">
          <el-select v-model="instoreObj.form.entrustFactorycode" placeholder="请选择" style="width: 100px">
            <el-option v-for="i in instoreObj.factoryList" :key="i.factoryid" :label="i.factoryname"
              :value="i.attributevalue">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="库存位置" prop="stockLocation">
          <el-select v-model="instoreObj.form.stockLocation" placeholder="请选择" style="width: 180px">
            <el-option v-for="i in instoreObj.stockLocationList" :key="i.erpinstorelocatiname" :label="i.lgort"
              :value="i.erpinstorelocatiname">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="机型" prop="productfamily">
          <el-input v-model.trim="instoreObj.form.productfamily" style="width: 100px;"></el-input>
        </el-form-item>
        <el-form-item label="合格数" prop="passqty">
          <el-input v-model.trim="instoreObj.form.passqty" style="width: 80px;" input-style="color:#67C23A;">
            <template #prefix>
              <el-icon color="#67C23A">
                <circle-check-filled />
              </el-icon>
            </template>
          </el-input>
        </el-form-item>
        <el-form-item label="报废数" prop="lossqty">
          <el-input v-model.trim="instoreObj.form.lossqty" style="width: 80px;">
            <template #prefix>
              <el-icon color="#F56C6C">
                <circle-close-filled />
              </el-icon>
            </template>
          </el-input>
        </el-form-item>
        <el-form-item label="提交数" prop="submitqty">
          <el-input v-model.trim="instoreObj.form.submitqty" style="width: 80px;"></el-input>
        </el-form-item>
        <el-form-item label="一次交检合格数" prop="onceQualifiedNum">
          <el-input v-model.trim="instoreObj.form.onceQualifiedNum" style="width: 120px;"></el-input>
        </el-form-item>
        <el-form-item label="质保单数量" prop="qualityPolicyNumber">
          <el-input v-model.trim="instoreObj.form.qualityPolicyNumber" style="width: 120px;"></el-input>
        </el-form-item>
        <el-form-item label="待料单号">
          <el-input v-model.trim="instoreObj.form.replaceMaterialNumber" style="width: 100px;"></el-input>
        </el-form-item>
        <el-form-item label="炉批次顺序号">
          <el-input v-model.trim="instoreObj.form.zlpNum" style="width: 100px;"></el-input>
        </el-form-item>
        <el-form-item label="不合格品审理单号" prop="zbhgdh">
          <el-input v-model.trim="instoreObj.form.zbhgdh" style="width: 160px;"></el-input>
        </el-form-item>
        <el-form-item label="油封日期" prop="oilSealDate">
          <el-date-picker v-model="instoreObj.form.oilSealDate" type="date" value-format="YYYY-MM-DD"
            style="width: 160px;">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="备注">
          <el-input v-model.trim="instoreObj.form.notes"></el-input>
        </el-form-item>
        <el-form-item label="油封周期">
          <el-input v-model.trim="instoreObj.form.oilPeriod"></el-input>
        </el-form-item>
        <el-form-item label="配套发送信息">
          <el-input v-model.trim="instoreObj.form.allsetMsg"></el-input>
        </el-form-item>
        <el-form-item label="配套零件号">
          <el-input v-model.trim="instoreObj.form.allsetProductname"></el-input>
        </el-form-item>
        <el-form-item label="配套批次号">
          <el-input v-model.trim="instoreObj.form.allsetContainername"></el-input>
        </el-form-item>
        <el-form-item label="&nbsp;">
          <el-button type="success" :icon="'Check'" @click="handleInstoreConfirmClick">确认</el-button>
        </el-form-item>
      </el-form>

      <!-- 批次入库信息录入 -->
      <el-tabs v-model="instoreObj.tabObj.container">
        <el-tab-pane label="批次入库信息录入" name="containerInfo">
          <el-table height="250" :data="instoreObj.containerList" ref="instoreObjContainerTableRef" stripe border>
            <el-table-column type="index" width="50"></el-table-column>
            <el-table-column type="selection" width="40"></el-table-column>
            <el-table-column label="id" prop="id" v-if="false"></el-table-column>
            <el-table-column label="批次id" prop="containerid" v-if="false"></el-table-column>
            <el-table-column label="流水卡号" prop="containername" width="160"></el-table-column>
            <el-table-column label="containertype" prop="containertype" v-if="false"></el-table-column>
            <el-table-column label="入库类型" prop="instoreType" width="120">
              <template #default="scope">
                <el-select v-model="scope.row.instoreType" placeholder="请选择">
                  <el-option :key="'正常入库'" :label="'正常入库'" :value="'正常入库'"></el-option>
                  <el-option :key="'副产品入库'" :label="'副产品入库'" :value="'副产品入库'"></el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column label="合格数" prop="passqty" width="80">
              <template #default="scope">
                <el-input v-model.trim="scope.row.passqty" @blur="handleInstoreCellBlur('合格数',scope.row)"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="报废数" prop="lossqty" width="80">
              <template #default="scope">
                <el-input v-model.trim="scope.row.lossqty" @blur="handleInstoreCellBlur('报废数',scope.row)"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="一次交检合格数" prop="onceQualifiedNum" width="80">
              <template #default="scope">
                <el-input v-model.trim="scope.row.onceQualifiedNum" @blur="handleInstoreCellBlur('一次交检合格数',scope.row)">
                </el-input>
              </template>
            </el-table-column>
            <el-table-column label="提交数" prop="submitqty" width="80">
              <template #default="scope">
                <el-input v-model.trim="scope.row.submitqty" @blur="handleInstoreCellBlur('提交数',scope.row)"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="生产分厂" prop="originalFactorycode" width="140">
              <template #default="scope">
                <el-select v-model="scope.row.originalFactorycode" placeholder="请选择">
                  <el-option v-for="i in instoreObj.factoryList" :key="i.factoryid" :label="i.factoryname"
                    :value="i.attributevalue">
                  </el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column label="委托单位" prop="entrustFactorycode" width="140">
              <template #default="scope">
                <el-select v-model="scope.row.entrustFactorycode" placeholder="请选择">
                  <el-option v-for="i in instoreObj.factoryList" :key="i.factoryid" :label="i.factoryname"
                    :value="i.attributevalue">
                  </el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column label="库存位置" prop="stockLocation" width="160">
              <template #default="scope">
                <el-select v-model="scope.row.stockLocation" placeholder="请选择">
                  <el-option v-for="i in instoreObj.stockLocationList" :key="i.erpinstorelocatiname" :label="i.lgort"
                    :value="i.erpinstorelocatiname">
                  </el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column label="待料单号" prop="replaceMaterialNumber" width="100">
              <template #default="scope">
                <el-input v-model.trim="scope.row.replaceMaterialNumber"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="机型" prop="productfamily" width="100">
              <template #default="scope">
                <el-input v-model.trim="scope.row.productfamily"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="质保单数量" prop="qualityPolicyNumber" width="100">
              <template #default="scope">
                <el-input v-model.trim="scope.row.qualityPolicyNumber" @blur="handleInstoreCellBlur('质保单数量',scope.row)">
                </el-input>
              </template>
            </el-table-column>
            <el-table-column label="炉批顺序号" prop="zlpNum" width="100">
              <template #default="scope">
                <el-input v-model.trim="scope.row.zlpNum"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="备注" prop="notes" width="100">
              <template #default="scope">
                <el-input v-model.trim="scope.row.notes"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="油封周期" prop="oilPeriod" width="100">
              <template #default="scope">
                <el-input v-model.trim="scope.row.oilPeriod"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="配套发送信息" prop="allsetMsg" width="140">
              <template #default="scope">
                <el-input v-model.trim="scope.row.allsetMsg"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="配套零件号" prop="allsetProductname" width="140">
              <template #default="scope">
                <el-input v-model.trim="scope.row.allsetProductname"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="配套批次号" prop="allsetContainername" width="140">
              <template #default="scope">
                <el-input v-model.trim="scope.row.allsetContainername"></el-input>
              </template>
            </el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>

      <!-- 副产品入库列表 -->
      <el-tabs v-model="instoreObj.tabObj.byproduct">
        <el-tab-pane label="副产品入库列表" name="byproduct">
          <!-- 副产品入库列表-form -->
          <el-form :inline="true" :label-position="'top'" :model="instoreObj.byproductForm"
            :rules="instoreObj.byproductFormRules" ref="byproductFormRef" style="margin-bottom:10px;">
            <el-form-item label="物料编号:" prop="materialNo">
              <el-input v-model.trim="instoreObj.byproductForm.materialNo"></el-input>
            </el-form-item>
            <el-form-item label="提交数:" prop="submitNum">
              <el-input v-model.trim="instoreObj.byproductForm.submitNum" style="width: 120px;"></el-input>
            </el-form-item>
            <el-form-item label="合格数:" prop="qualifiedNum">
              <el-input v-model.trim="instoreObj.byproductForm.qualifiedNum" style="width: 120px;">
                <template #prefix>
                  <el-icon color="#67C23A">
                    <circle-check-filled />
                  </el-icon>
                </template>
              </el-input>
            </el-form-item>
            <el-form-item label="报废数:" prop="lossNum">
              <el-input v-model.trim="instoreObj.byproductForm.lossNum" style="width: 120px;">
                <template #prefix>
                  <el-icon color="#F56C6C">
                    <circle-close-filled />
                  </el-icon>
                </template>
              </el-input>
            </el-form-item>
            <el-form-item label="一次交检合格数:" prop="onceQualifiedNum">
              <el-input v-model.trim="instoreObj.byproductForm.onceQualifiedNum" style="width: 160px;"></el-input>
            </el-form-item>
            <el-form-item label="质保单数:" prop="qualityPolicyNumber">
              <el-input v-model.trim="instoreObj.byproductForm.qualityPolicyNumber" style="width: 120px;"></el-input>
            </el-form-item>
            <el-form-item label="&nbsp;">
              <el-button type="primary" :icon="'Plus'" @click="handleInstoreAddClick">添加</el-button>
              <el-button type="danger" :icon="'Delete'" @click="handleInstoreDeleteClick">删除</el-button>
            </el-form-item>
          </el-form>
          <!-- 副产品入库列表-table -->
          <el-table height="100" :data="instoreObj.dataList" ref="instoreObjTableRef" stripe border>
            <el-table-column type="index" width="50"></el-table-column>
            <el-table-column type="selection" width="40"></el-table-column>
            <el-table-column label="id" prop="id" v-if="false"></el-table-column>
            <el-table-column label="物料编号" prop="materialNo"></el-table-column>
            <el-table-column label="提交数" prop="submitNum"></el-table-column>
            <el-table-column label="合格数" prop="qualifiedNum"></el-table-column>
            <el-table-column label="报废数" prop="lossNum"></el-table-column>
            <el-table-column label="一次交检合格数" prop="onceQualifiedNum"></el-table-column>
            <el-table-column label="质保单数" prop="qualityPolicyNumber"></el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>

      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" :icon="'Check'" @click="handleInstoreSubmitClick">提交</el-button>
          <el-button @click="instoreObj.dialogVisible = false" :icon="'Close'">关闭</el-button>
        </div>
      </template>
    </el-dialog>

    <!-- 超越单查看对话框 -->
    <el-dialog v-model="surpassBillObj.dialogVisible" title="超越单信息" width="60%" :draggable="true" align-center>
      <el-card>
        <template #header>
          <div style="display: flex;align-items: center;position: relative;">
            <el-icon class="card-header-icon" style="font-size: 20px;">
              <info-filled />
            </el-icon>
            <span class="card-header-text">超越单信息</span>
          </div>
        </template>
        <el-table :data="surpassBillObj.dataList" stripe height="400">
          <el-table-column prop="containername" label="零件和批次"></el-table-column>
          <el-table-column prop="surpassbillname" label="超越单号" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column prop="surpassbillrevision" label="超越版本" width="80" show-overflow-tooltip></el-table-column>
          <el-table-column prop="processno" label="工艺规程" width="100" show-overflow-tooltip></el-table-column>
          <el-table-column prop="specno" label="工序号" width="100" show-overflow-tooltip></el-table-column>
          <el-table-column prop="remark" label="超越单备注" width="100" show-overflow-tooltip></el-table-column>
          <el-table-column prop="effective" label="有效期" width="100" show-overflow-tooltip></el-table-column>
        </el-table>
      </el-card>

      <el-card style="margin-top: 10px;">
        <template #header>
          <div style="display: flex;align-items: center;position: relative;">
            <el-icon class="card-header-icon" style="font-size: 20px;">
              <info-filled />
            </el-icon>
            <span class="card-header-text">超越单附件信息</span>
          </div>
        </template>
        <el-table :data="surpassBillObj.docList" stripe>
          <el-table-column prop="accessoriesname" label="附件">
            <template #default="scope">
              <el-link :href="scope.row.url" target="_blank">{{scope.row.accessoriespath}}</el-link>
            </template>
          </el-table-column>
          <el-table-column prop="surpassbillname" label="超越单号"></el-table-column>
        </el-table>
      </el-card>

      <template #footer>
        <span class="dialog-footer">
          <el-button @click="surpassBillObj.dialogVisible = false" :icon="'Close'">关闭</el-button>
        </span>
      </template>
    </el-dialog>

    <!-- 文档查看对话框 -->
    <el-dialog v-model="documentViewObj.dialogVisible" title="文档查看" width="60%" :draggable="true" align-center>
      <el-row :gutter="10">
        <el-col :span="14">
          <el-scrollbar height="400">
            <el-card>
              <template #header>
                <div style="display: flex;align-items: center;position: relative;">
                  <el-icon class="card-header-icon" style="font-size: 20px;">
                    <info-filled />
                  </el-icon>
                  <span class="card-header-text">工艺信息</span>
                </div>
              </template>
              <el-tree :data="documentViewObj.treeData" node-key="id" :default-expand-all="true"
                :expand-on-click-node="false" @node-click="handleNodeClick">
                <template #default="scope">
                  <el-icon v-if="scope.data.type !== 'spec'" style="color:orange;margin-right: 10px;">
                    <Folder />
                  </el-icon>
                  <el-icon v-else style="margin-right: 10px;">
                    <Grid />
                  </el-icon>
                  {{scope.data.label}}
                </template>
              </el-tree>
            </el-card>
          </el-scrollbar>
        </el-col>
        <el-col :span="10">
          <el-card>
            <template #header>
              <div style="display: flex;align-items: center;position: relative;">
                <el-icon class="card-header-icon" style="font-size: 20px;">
                  <List />
                </el-icon>
                <span class="card-header-text">文档清单</span>
              </div>
            </template>
            <el-table :data="documentViewObj.documentList" stripe border>
              <el-table-column type="index" width="50"></el-table-column>
              <el-table-column label="文档名称" prop="documentname" show-overflow-tooltip>
              </el-table-column>
              <el-table-column label="操作" prop="filepath" width="120">
                <template #default="scope">
                  <el-link type="primary" @click="handleOpenDocumentClick(scope.row.filepath)">查看文档
                  </el-link>
                </template>
              </el-table-column>
            </el-table>
          </el-card>
        </el-col>
      </el-row>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="documentViewObj.dialogVisible = false" :icon="'Close'">关闭</el-button>
        </span>
      </template>
    </el-dialog>

    <!-- 理化试验申请 对话框 -->
    <el-dialog v-model="entrustMeteringObj.dialogVisible" title="理化试验申请" width="80%" :draggable="true" align-center>
      <!-- 表单 -->
      <el-form :inline="true" :rules="entrustMeteringObj.formRules" ref="entrustMeteringFormRef"
        :model="entrustMeteringObj.form" :label-position="'top'" style="margin:10px;">
        <el-form-item label="批次号">
          <el-input v-model="entrustMeteringObj.form.containername" disabled></el-input>
        </el-form-item>
        <el-form-item label="零件号">
          <el-input v-model="entrustMeteringObj.form.productname" disabled></el-input>
        </el-form-item>
        <el-form-item label="零件名称">
          <el-input v-model="entrustMeteringObj.form.productdesc" disabled></el-input>
        </el-form-item>
        <el-form-item label="工序">
          <el-input v-model="entrustMeteringObj.form.workflowstepname" disabled></el-input>
        </el-form-item>
        <el-form-item label="批次数量">
          <el-input v-model="entrustMeteringObj.form.qty" style="width: 100px;" disabled></el-input>
        </el-form-item>
        <el-form-item label="委托单位">
          <el-input v-model="entrustMeteringObj.form.originalfactoryname" disabled></el-input>
        </el-form-item>
        <el-form-item label="委托单号">
          <el-input v-model="entrustMeteringObj.form.entrustMeteringCheckName" disabled></el-input>
        </el-form-item>
        <el-form-item label="委托数量" prop="entrustMeteringQty">
          <el-input v-model.trim="entrustMeteringObj.form.entrustMeteringQty" @blur="handleEntrustMeteringQtyBlur"
            style="width: 100px;" :disabled="entrustMeteringObj.inputConfig.entrustMeteringQtyDisable"></el-input>
        </el-form-item>
        <el-form-item label="已委托数量">
          <el-input v-model.number="entrustMeteringObj.form.entrustMeteringedQty" disabled style="width: 100px;">
          </el-input>
        </el-form-item>
        <el-form-item label="已报工数量">
          <el-input v-model="entrustMeteringObj.form.workreportnum" disabled style="width: 100px;"></el-input>
        </el-form-item>
        <el-form-item label="检验类型">
          <el-select v-model="entrustMeteringObj.form.checktype" placeholder="请选择" style="width: 160px;"
            @change="handleEntrustMeteringChecktypeChange">
            <el-option :key="'1'" :label="'特种检验'" :value="'1'"></el-option>
            <el-option :key="'2'" :label="'无损检验'" :value="'2'"></el-option>
            <el-option :key="'3'" :label="'理化检验'" :value="'3'"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="要求取件日期" prop="requireGetDate">
          <el-date-picker v-model="entrustMeteringObj.form.requireGetDate" type="date" placeholder="请选择日期"
            style="width: 180px;" value-format="YYYY-MM-DD">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预定取件日期" prop="reserveGetDate">
          <el-date-picker v-model="entrustMeteringObj.form.reserveGetDate" type="date" placeholder="请选择日期"
            style="width: 180px;" value-format="YYYY-MM-DD">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="材料标准或规范" prop="specification">
          <el-input v-model.trim="entrustMeteringObj.form.specification"></el-input>
        </el-form-item>
        <el-form-item label="炉批号" prop="batchNO">
          <el-input v-model.trim="entrustMeteringObj.form.batchNO"></el-input>
        </el-form-item>
        <el-form-item label="委托备注:" prop="remark">
          <el-input v-model.trim="entrustMeteringObj.form.remark"></el-input>
        </el-form-item>
      </el-form>
      <el-tabs v-model="entrustMeteringObj.tabIndex">
        <el-tab-pane label="委托检测项" name="first" style="width: 100%;">
          <el-form :inline="true" :label-position="'top'" :model="entrustMeteringObj.checkItemMaintForm"
            ref="entrustMeteringCheckItemMaintFormRef">
            <el-form-item label="检测项目:" prop="CheckName" v-if="entrustMeteringObj.form.checktype == '3'">
              <el-select v-model="entrustMeteringObj.checkItemMaintForm.CheckName" placeholder="请选择"
                style="width: 240px">
                <el-option-group v-for="group in options" :key="group.label" :label="group.label">
                  <el-option v-for="item in group.options" :key="item.value" :label="item.value" :value="item.value" />
                </el-option-group>
              </el-select>
            </el-form-item>
            <el-form-item label="检测项描述:" prop="CheckDesc">
              <el-input v-model.trim="entrustMeteringObj.checkItemMaintForm.CheckDesc"></el-input>
            </el-form-item>
            <el-form-item label="图纸序号:" prop="DrawingNO" v-if="entrustMeteringObj.form.checktype !== '3'">
              <el-input v-model.trim=" entrustMeteringObj.checkItemMaintForm.DrawingNO"></el-input>
            </el-form-item>
            <el-form-item label="&nbsp;">
              <el-button type="primary" :icon="'Plus'" @click="handleEntrustMeteringAddClick">添加</el-button>
              <el-button type="danger" :icon="'Delete'" @click="handleEntrustMeteringDeleteClick">删除</el-button>
            </el-form-item>
          </el-form>
          <el-row :gutter=" 10" style="margin: 10px 0px;">
            <el-col :span="12">
              <!-- 检测项表格 -->
              <el-table height="350" :data="entrustMeteringObj.dataList" ref="entrustMeteringTableRef" stripe border>
                <el-table-column type="index" width="50"></el-table-column>
                <el-table-column type="selection" width="40"></el-table-column>
                <el-table-column label="id" prop="id" v-if="false"></el-table-column>
                <el-table-column :label="entrustMeteringObj.form.checktype !== '3' ? '要求尺寸' : '检测项目'" prop="StrSize"
                  show-overflow-tooltip>
                  <template #default="scope">
                    <span v-html="scope.row.StrSize"></span>
                  </template>
                </el-table-column>
                <el-table-column label="检测项描述" prop="CheckDesc" show-overflow-tooltip></el-table-column>
                <el-table-column label="图纸序号" prop="DrawingNO" show-overflow-tooltip
                  v-if="entrustMeteringObj.form.checktype !== '3'">
                </el-table-column>
              </el-table>
            </el-col>
            <el-col :span="12" v-if="entrustMeteringObj.form.checktype !== '3'">
              <iframe src="../../../forms/Custom/htmlPage/StepCheckPoint/CheckPointSymbolInput.aspx" width="400px"
                height="347px" scrolling="no" id="pointContent"></iframe>
            </el-col>
          </el-row>
        </el-tab-pane>
      </el-tabs>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="handleEntrustMeteringSubmit" :icon="'Check'">提交</el-button>
          <el-button @click="entrustMeteringObj.dialogVisible = false" :icon="'Close'">关闭</el-button>
        </div>
      </template>
    </el-dialog>

    <!-- 返工返修对话框 -->
    <el-dialog id="reworkObj" v-model="reworkObj.dialogVisible" title="返工返修" width="95%" :draggable="true" align-center
      :close-on-click-modal="true" @closed="resetReworkDialogData">
      <!-- 表单 -->
      <el-form :inline="true" :rules="reworkObj.formRules" ref="reworkObjFormRef" :model="reworkObj.form"
        :label-position="'top'">
        <el-form-item label="批次号">
          <el-input v-model="reworkObj.form.containername" disabled></el-input>
        </el-form-item>
        <el-form-item label="批次数量">
          <el-input v-model="reworkObj.form.qty" style="width: 80px;" disabled></el-input>
        </el-form-item>
        <el-form-item label="工序">
          <el-input v-model="reworkObj.form.workflowstepname" disabled style="width: 80px;"></el-input>
        </el-form-item>
        <el-form-item label="零件号">
          <el-input v-model="reworkObj.form.productname" disabled></el-input>
        </el-form-item>
        <el-form-item label="零件名称">
          <el-input v-model="reworkObj.form.productdesc" disabled></el-input>
        </el-form-item>
        <el-form-item label="生产订单号">
          <el-input v-model="reworkObj.form.mfgordername" disabled></el-input>
        </el-form-item>
        <el-form-item label="返修编号">
          <el-input v-model="reworkObj.form.reworkNo" disabled></el-input>
        </el-form-item>
        <el-form-item label="检验员">
          <el-input v-model="reworkObj.form.checker" disabled style="width: 80px;"></el-input>
        </el-form-item>
        <el-form-item label="发现单位">
          <el-input v-model="reworkObj.form.discoverDept" disabled></el-input>
        </el-form-item>
        <el-form-item label="在制数">
          <el-input v-model.number="reworkObj.form.qty" disabled style="width: 80px;"></el-input>
        </el-form-item>
        <el-form-item label="已返修数">
          <el-input v-model.number="reworkObj.form.reworkSum" disabled style="width: 80px;"></el-input>
        </el-form-item>
        <el-form-item label="责任单位" prop="dutyDept">
          <el-input v-model.trim="reworkObj.form.dutyDept"></el-input>
        </el-form-item>
        <el-form-item label="责任人" prop="dutyEmp">
          <el-input v-model.trim="reworkObj.form.dutyEmp"></el-input>
        </el-form-item>
        <el-form-item label="更改单号" prop="changNo">
          <el-input v-model.trim="reworkObj.form.changNo"></el-input>
        </el-form-item>
      </el-form>
      <!-- 返工返修历史记录 -->
      <el-tabs v-model="reworkObj.tabObj.historyTab">
        <el-tab-pane label="返工返修历史记录" name="historyTab">
          <el-table height="250" :data="reworkObj.historyDataList" stripe border>
            <el-table-column type="index" width="50"></el-table-column>
            <el-table-column label="id" prop="stepreworkinfoid" v-if="false"></el-table-column>
            <el-table-column label="返修编号" prop="stepreworkinfono"></el-table-column>
            <el-table-column label="返修数" prop="reworkqty"></el-table-column>
            <el-table-column label="更改单号" prop="changebillno"></el-table-column>
            <el-table-column label="检验单位" prop="checkworkcenter"></el-table-column>
            <el-table-column label="检验员" prop="checkemployee"></el-table-column>
            <el-table-column label="责任单位" prop="responseworkcenter"></el-table-column>
            <el-table-column label="责任人" prop="responseworker"></el-table-column>
            <el-table-column label="提交时间" prop="createdate"></el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>

      <!-- 返工原因维护 -->
      <el-tabs v-model="reworkObj.tabObj.reworkTab">
        <el-tab-pane label="返工原因维护" name="reworkTab">
          <!-- 返工原因维护-form -->
          <el-form :inline="true" :label-position="'top'" :model="reworkObj.reworkResonForm"
            :rules="reworkObj.reworkResonFormRules" ref="reworkReasonFormRef" style="margin-bottom:10px;">
            <el-form-item label="返修数:" prop="reworkQty">
              <el-input v-model.trim.number="reworkObj.reworkResonForm.reworkQty"></el-input>
            </el-form-item>
            <el-form-item label="返工原因:" prop="reworkReason">
              <el-select v-model="reworkObj.reworkResonForm.reworkReason" placeholder="请选择" clearable
                style="width: 240px;">
                <el-option v-for="item in reworkObj.lossReasonList" :key="item.lossreasonid"
                  :label="item.lossreasonname" :value="item.lossreasonid">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="&nbsp;">
              <el-button type="primary" :icon="'Plus'" @click="handleReworkAddClick">添加</el-button>
              <el-button type="danger" :icon="'Delete'" @click="handleReworkDeleteClick">删除</el-button>
            </el-form-item>
          </el-form>
          <!-- 返修原因维护-table -->
          <el-table height="150" :data="reworkObj.reworkInfoDataList" ref="reworkReasonTableRef" stripe border>
            <el-table-column type="index" width="50"></el-table-column>
            <el-table-column type="selection" width="40"></el-table-column>
            <el-table-column label="id" prop="id" v-if="false"></el-table-column>
            <el-table-column label="返修数" prop="reworkQty"></el-table-column>
            <el-table-column label="返工原因" prop="reworkReasonName"></el-table-column>
            <el-table-column label="返工原因id" prop="reworkReasonId" v-if="false"></el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" :icon="'Check'" @click="handleReworkSubmitClick">提交</el-button>
          <el-button @click="reworkObj.dialogVisible = false" :icon="'Close'">关闭</el-button>
        </div>
      </template>
    </el-dialog>

    <!-- 检验待处理 对话框 -->
    <el-dialog v-model="checkSuspendingObj.dialogVisible" title="检验待处理" width="60%" :draggable="true" align-center>
      <el-tabs v-model="checkSuspendingObj.tabname">
        <el-tab-pane label="流水卡信息" name="first">
          <el-table height="200" :data="checkSuspendingObj.dataList" stripe border>
            <el-table-column label="流水卡号" prop="containername" show-overflow-tooltip></el-table-column>
            <el-table-column label="批次id" prop="containerid" v-if="false"></el-table-column>
            <el-table-column label="在制数" prop="qty" width="80"></el-table-column>
            <el-table-column label="首检" prop="firstchecknum" width="60">
              <template #default="scope">
                {{scope.row.firstchecknum === 1 ? '是' : '否'}}
              </template>
            </el-table-column>
            <el-table-column label="工序检" prop="stepchecknum" width="80">
              <template #default="scope">
                {{scope.row.stepchecknum === 1 ? '是' : '否'}}
              </template>
            </el-table-column>
            <el-table-column label="当前工序" prop="workflowstepname" width="170" show-overflow-tooltip></el-table-column>
            <el-table-column label="工序id" prop="workflowstepid" v-if="false"></el-table-column>
          </el-table>
          <el-form style="margin-bottom: 20px;" :label-position="'top'" :model="checkSuspendingObj.form"
            :rules="checkSuspendingObj.formRules" ref="checkSuspendingFormRef" @submit.prevent>
            <el-form-item label="备注:" prop="notes">
              <el-input placeholder="请输入备注" v-model.trim="checkSuspendingObj.form.notes"></el-input>
            </el-form-item>
          </el-form>
        </el-tab-pane>
      </el-tabs>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="handleCheckSuspendingSubmitClick" :icon="'Check'">提交</el-button>
          <el-button @click="checkSuspendingObj.dialogVisible = false" :icon="'Close'">关闭</el-button>
        </div>
      </template>
    </el-dialog>

    <!-- 实测值录入 对话框 -->
    <el-dialog v-model="inputCheckResultObj.dialogVisible" :top="'100px'" title="实测值录入" width="98%" :draggable="false"
      align-center>
      <el-tabs v-model="inputCheckResultObj.tabObj.container">
        <el-tab-pane label="流水卡信息" name="container">
          <el-table height="160" :data="inputCheckResultObj.containerList" stripe border highlight-current-row
            @current-change="handleCurrentChange" ref="inputCheckResultDialogContainerTableRef">
            <el-table-column type="index" width="50"></el-table-column>
            <el-table-column label="批次id" prop="containerid" v-if="false"></el-table-column>
            <el-table-column label="报工id" prop="containerstepworkreportid" v-if="false"></el-table-column>
            <el-table-column label="工序id" prop="workflowstepid" v-if="false"></el-table-column>
            <el-table-column label="流水卡号" prop="containername" show-overflow-tooltip></el-table-column>
            <el-table-column label="产品" prop="productdescription" show-overflow-tooltip></el-table-column>
            <el-table-column label="批次类型" prop="containertypename" width="120">
              <template #default="scope">
                <span v-if="scope.row.containertypename === 2">批量加工</span>
                <span v-else-if="scope.row.containertypename === 7">单件加工</span>
                <span v-else>批量带子序号</span>
              </template>
            </el-table-column>
            <el-table-column label="数量" prop="qtys"></el-table-column>
            <el-table-column label="报工人" prop="fullname"></el-table-column>
            <el-table-column label="报工时间" prop="createdate"></el-table-column>
            <el-table-column label="报工数量" prop="qty"></el-table-column>
            <el-table-column label="报工类型" prop="checktype"></el-table-column>
            <el-table-column label="工序" prop="workflowstepname"></el-table-column>
            <el-table-column label="工步" prop="stepinfoname"></el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>
      <el-row :gutter="10">
        <el-col :span="18">
          <el-row :gutter="10">
            <el-col :span="19">
              <el-tabs v-model="inputCheckResultObj.tabObj.checkitem">
                <el-tab-pane label="检测项区域" name="checkitem">
                  <el-table height="340" ref="inputCheckResultDialogCheckItemTableRef"
                    :data="inputCheckResultObj.checkitemList" @selection-change="getStepCheckPointResult"
                    @row-click="checkItemRowClick" stripe border>
                    <el-table-column type="index" width="50"></el-table-column>
                    <el-table-column type="selection" width="40"></el-table-column>
                    <el-table-column label="关重符号" prop="name" width="80" show-overflow-tooltip show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="检验内容描述" prop="checkpointnotedis" width="80" show-overflow-tooltip
                      show-overflow-tooltip>
                      <template #default="scope">
                        <span v-html="scope.row.checkpointnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="图纸规定" prop="drawingrequiredis" width="100" show-overflow-tooltip>
                      <template #default="scope">
                        <span v-html="scope.row.drawingrequiredis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="基准值" prop="basevalue" width="60" show-overflow-tooltip></el-table-column>
                    <el-table-column label="上偏差" prop="ceilfloat" width="60" show-overflow-tooltip></el-table-column>
                    <el-table-column label="下偏差" prop="floorfloat" width="60" show-overflow-tooltip></el-table-column>
                    <el-table-column label="工人录入实测值" prop="workcheckpointresultnotedis" width="80"
                      show-overflow-tooltip>
                      <template #default="scope">
                        <span v-html="scope.row.workcheckpointresultnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="检验录入实测值" prop="checkpointresultnotedis" width="80" show-overflow-tooltip>
                      <template #default="scope">
                        <span v-html="scope.row.checkpointresultnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="检查手段" prop="checkmethod" width="60" show-overflow-tooltip></el-table-column>
                    <el-table-column label="录入次数" prop="inputnum" width="60" show-overflow-tooltip></el-table-column>
                    <el-table-column label="已录入次数" prop="inputcount" width="70" show-overflow-tooltip></el-table-column>
                    <el-table-column label="关键过程" prop="keycheckname" width="60" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="关键过程类型" prop="checktypename" width="80" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="工序检" prop="meopcheckname" width="60" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="质保单" prop="qualitycheckname" width="60" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="气泡号" prop="bubblenumber" width="60" show-overflow-tooltip></el-table-column>
                  </el-table>
                </el-tab-pane>
              </el-tabs>
            </el-col>
            <el-col :span="5">
              <el-tabs v-model="inputCheckResultObj.tabObj.childcontainer">
                <el-tab-pane label="子序号区域" name="childcontainer">
                  <el-table height="340" :data="inputCheckResultObj.childContainerList"
                    ref="inputCheckResultDialogChildContainerRef" stripe border
                    @selection-change="getStepCheckPointResult">
                    <el-table-column type="index" width="50"></el-table-column>
                    <el-table-column type="selection" width="40"></el-table-column>
                    <el-table-column label="子序号批次" prop="childcontainername" show-overflow-tooltip></el-table-column>
                  </el-table>
                </el-tab-pane>
              </el-tabs>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-tabs v-model="inputCheckResultObj.tabObj.checkresult">
                <el-tab-pane label="结果区域" name="checkresult">
                  <el-table height="300" :data="inputCheckResultObj.checkItemResultList"
                    ref="inputCheckResultDialogCheckResultTableRef" stripe border>
                    <el-table-column type="index" width="50"></el-table-column>
                    <el-table-column type="selection" width="40"></el-table-column>
                    <el-table-column label="子批次" prop="childcontainername"></el-table-column>
                    <!-- <el-table-column label="基准值" prop="basevalue" width="80" show-overflow-tooltip></el-table-column>
                    <el-table-column label="上偏差" prop="ceilfloat" width="80" show-overflow-tooltip></el-table-column>
                    <el-table-column label="下偏差" prop="floorfloat" width="80" show-overflow-tooltip></el-table-column> -->
                    <el-table-column label="工人实测值" prop="workcheckpointresultnotedis">
                      <template #default="scope">
                        <span v-html="scope.row.workcheckpointresultnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="工人实测值超差" prop="workerstatus" width="80">
                      <template #default="scope">
                        <el-tag type="danger" v-if="scope.row.workerstatus">是</el-tag>
                      </template>
                    </el-table-column>
                    <el-table-column label="录入时间" prop="createdate" width="160">
                      <template #default="scope">
                        <span v-if="scope.row.createdate"> {{scope.row.createdate.replace('T',' ')}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="工人/三坐标" prop="worker" width="100"></el-table-column>
                    <el-table-column label="工人附件" prop="workresultdocname" width="80" show-overflow-tooltip>
                      <template #default="scope">
                        <div v-if="scope.row.workresultdocpath">
                          <el-link :href="scope.row.workresultdocpath" target="_blank" type="primary">查看</el-link>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column label="检验实测值" prop="checkpointresultnotedis">
                      <template #default="scope">
                        <span v-html="scope.row.checkpointresultnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="检验实测值超差" prop="checkerstatus" width="80">
                      <template #default="scope">
                        <el-tag type="danger" v-if="scope.row.checkerstatus">是</el-tag>
                      </template>
                    </el-table-column>
                    <el-table-column label="录入时间" prop="checkdate" width="160">
                      <template #default="scope">
                        <span v-if="scope.row.checkdate"> {{scope.row.checkdate.replace('T',' ')}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="检验员" prop="checker" width="80"></el-table-column>
                    <el-table-column label="检验附件" prop="checkresultdocname" width="80" show-overflow-tooltip>
                      <template #default="scope">
                        <div v-if="scope.row.checkresultdocpath">
                          <el-link :href="scope.row.checkresultdocpath" target="_blank" type="primary">查看</el-link>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table>
                </el-tab-pane>
              </el-tabs>
            </el-col>
          </el-row>
        </el-col>

        <el-col :span="6">
          <el-tabs v-model="inputCheckResultObj.tabObj.inputZone">
            <el-tab-pane label="填写区域" name="inputZone">
              <iframe src="../../../forms/Custom/htmlPage/StepCheckPoint/CheckPointSymbolInput.aspx" width="400px"
                height="320px" scrolling="no" id="inputCheckPointContent">
              </iframe>
              <div style="margin:10px 0;">
                <el-button type="primary" :icon="'DocumentCopy'" @click="copyWorkerInputValue">一键确认</el-button>
                <el-button type="success" :icon="'Check'" @click="saveCheckPointCheckerValue">保存</el-button>
                <el-button type="danger" :icon="'Delete'" @click="deleteCheckPointResult">删除</el-button>
              </div>
              <div>
                <el-button type="warning" :icon="'Download'" @click="exportCheckPointResult">检测项导出</el-button>
                <el-button type="primary" :icon="'Promotion'" @click="sendToThreeCoordinateRecord">推送三坐标</el-button>
              </div>
              <el-tabs v-model="inputCheckResultObj.tabObj.importCheckPoint">
                <el-tab-pane label="检测项导入" name="importCheckPoint">
                  <el-upload :multiple="false" accept=".xls,.xlsx" ref="importCheckResultUploadRef"
                    v-model:file-list="inputCheckResultObj.checkResultImportfileList"
                    action="../../../Ashx/InputCheckPointResultVue3PageHandler.ashx?actions=importCheckPointItem"
                    :multiple="false" :auto-upload="false" :on-success="handleCheckResultImportSuccess">
                    <template #trigger>
                      <el-button :size="'small'" type="primary" style="margin-right:10px;">选择文件</el-button>
                    </template>
                    <el-button :size="'small'" type="success" :icon="'Upload'" @click="importCheckPointResult">
                      确认并上传
                    </el-button>
                    <span style="color:red;font-weight:bold;margin-left: 10px;">内部系统，严禁上传涉密信息</span>
                    <template #tip>
                      <div style="margin-top:10px;">1. 只可导入Excel文件。</div>
                      <div>2. 请选择经【检测项导出】功能导出的Excel文件，不要修改表格模板，否则无法正常导入。</div>
                    </template>
                  </el-upload>
                </el-tab-pane>
              </el-tabs>
            </el-tab-pane>
          </el-tabs>
          <el-tabs v-model="inputCheckResultObj.tabObj.uploadZone">
            <el-tab-pane label="附件上传" name="uploadZone">
              <el-form @submit.prevent>
                <el-form-item label="范围:">
                  <el-select v-model="inputCheckResultObj.upload.type" placeholder="请选择">
                    <el-option :key="'公开'" :label="'公开'" :value="'公开'"></el-option>
                    <el-option :key="'内部'" :label="'内部'" :value="'内部'"></el-option>
                  </el-select>
                </el-form-item>
              </el-form>
              <el-upload :multiple="false" ref="fileUploadRef" v-model:file-list="inputCheckResultObj.fileUploadList"
                action="../../../Ashx/InputCheckPointResultVue3PageHandler.ashx?actions=uploadFile" :multiple="false"
                :auto-upload="false" :on-success="handleFileUploadSuccess" :data="inputCheckResultObj.fileUploadParams">
                <template #trigger>
                  <el-button :size="'small'" type="primary" style="margin-right:10px;">选择文件</el-button>
                </template>
                <el-button :size="'small'" type="success" :icon="'Upload'" @click="uploadFileSubmit">
                  确认并上传
                </el-button>
                <span style="color:red;font-weight:bold;margin-left: 10px;">内部系统，严禁上传涉密信息</span>
              </el-upload>
            </el-tab-pane>
          </el-tabs>
        </el-col>
      </el-row>
      <template #footer>
        <div class="dialog-footer">
          <el-button @click="inputCheckResultObj.dialogVisible = false" :icon="'Close'">关闭</el-button>
        </div>
      </template>
    </el-dialog>

    <!-- 实测值录入二维码 对话框 -->
    <el-dialog v-model="checkResultQRCodeObj.dialogVisible" :top="'100px'" title="实测值录入二维码" width="95%"
      :draggable="false" align-center>
      <el-tabs v-model="checkResultQRCodeObj.tabObj.container">
        <el-tab-pane label="流水卡信息" name="container">
          <el-table height="160" :data="checkResultQRCodeObj.containerList" stripe border
            ref="checkResultQRCodeContainerRef" highlight-current-row @current-change="checkResultQRCodeCurrentChange">
            <el-table-column label="批次id" prop="containerid" v-if="false"></el-table-column>
            <el-table-column label="工序id" prop="workflowstepid" v-if="false"></el-table-column>
            <el-table-column label="流水卡号" prop="containername" show-overflow-tooltip></el-table-column>
            <el-table-column label="产品" prop="productdescription" show-overflow-tooltip></el-table-column>
            <el-table-column label="批次类型" prop="containertypename" width="120">
              <template #default="scope">
                <span v-if="scope.row.containertypename === 2">批量加工</span>
                <span v-else-if="scope.row.containertypename === 7">单件加工</span>
                <span v-else>批量带子序号</span>
              </template>
            </el-table-column>
            <el-table-column label="数量" prop="qtys"></el-table-column>
            <el-table-column label="报工人" prop="fullname"></el-table-column>
            <el-table-column label="报工时间" prop="createdate"></el-table-column>
            <el-table-column label="报工数量" prop="qty"></el-table-column>
            <el-table-column label="报工类型" prop="checktype"></el-table-column>
            <el-table-column label="工序" prop="workflowstepname"></el-table-column>
            <el-table-column label="工步" prop="stepinfoname"></el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>
      <el-row :gutter="10">
        <el-col :span="20">
          <el-row :gutter="10">
            <el-col :span="19">
              <el-tabs v-model="checkResultQRCodeObj.tabObj.checkitem">
                <el-tab-pane label="检测项区域" name="checkitem">
                  <el-table height="240" ref="checkResultQRCodeCheckItemTableRef"
                    @selection-change="getcheckResultQRCodeResultTableData"
                    @row-click="checkResultQRCodeCheckItemTableRowClick" :data="checkResultQRCodeObj.checkitemList"
                    stripe border>
                    <el-table-column type="index" width="50"></el-table-column>
                    <el-table-column type="selection" width="40"></el-table-column>
                    <el-table-column label="关重符号" prop="name" show-overflow-tooltip></el-table-column>
                    <el-table-column label="检验内容描述" prop="checkpointnotedis" show-overflow-tooltip></el-table-column>
                    <el-table-column label="图纸规定" prop="drawingrequiredis">
                      <template #default="scope">
                        <span v-html="scope.row.drawingrequiredis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="基准值" prop="basevalue" width="80"></el-table-column>
                    <el-table-column label="上偏差" prop="ceilfloat" width="80"></el-table-column>
                    <el-table-column label="下偏差" prop="floorfloat" width="80"></el-table-column>
                    <el-table-column label="录入次数" prop="inputnum" width="80"></el-table-column>
                    <el-table-column label="已录入次数" prop="inputcount" width="80"></el-table-column>
                    <el-table-column label="关键过程" prop="keycheckname" width="80"></el-table-column>
                    <el-table-column label="关键过程类型" prop="checktypename" width="80"></el-table-column>
                    <el-table-column label="工序检" prop="meopcheckname" width="80"></el-table-column>
                    <el-table-column label="质保单" prop="qualitycheckname" width="80"></el-table-column>
                    <el-table-column label="气泡号" prop="bubblenumber" width="80"></el-table-column>
                  </el-table>
                </el-tab-pane>
              </el-tabs>
            </el-col>
            <el-col :span="5">
              <el-tabs v-model="checkResultQRCodeObj.tabObj.childcontainer">
                <el-tab-pane label="子序号区域" name="childcontainer">
                  <el-table height="240" :data="checkResultQRCodeObj.childContainerList"
                    ref="checkResultQRCodeChildContainerRef" stripe border>
                    <el-table-column type="index" width="50"></el-table-column>
                    <el-table-column type="selection" width="40"></el-table-column>
                    <el-table-column label="子序号批次" prop="childcontainername" show-overflow-tooltip></el-table-column>
                  </el-table>
                </el-tab-pane>
              </el-tabs>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-tabs v-model="checkResultQRCodeObj.tabObj.checkresult">
                <el-tab-pane label="结果区域" name="checkresult">
                  <el-table height="240" :data="checkResultQRCodeObj.checkItemResultList"
                    ref="checkResultQRCodeResultTableRef" stripe border>
                    <el-table-column type="index" width="50"></el-table-column>
                    <el-table-column type="selection" width="40"></el-table-column>
                    <el-table-column label="子批次" prop="childcontainername"></el-table-column>
                    <el-table-column label="工人实测值" prop="workcheckpointresultnotedis">
                      <template #default="scope">
                        <span v-html="scope.row.workcheckpointresultnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="录入时间" prop="createdate" width="160">
                      <template #default="scope">
                        <span v-if="scope.row.createdate"> {{scope.row.createdate.replace('T',' ')}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="工人/三坐标" prop="worker" width="100"></el-table-column>
                    <el-table-column label="工人附件" prop="workresultdocname" width="80" show-overflow-tooltip>
                      <template #default="scope">
                        <div v-if="scope.row.workresultdocpath">
                          <el-link :href="scope.row.workresultdocpath" target="_blank" type="primary">查看</el-link>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column label="检验实测值" prop="checkpointresultnotedis">
                      <template #default="scope">
                        <span v-html="scope.row.checkpointresultnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="录入时间" prop="checkdate" width="160">
                      <template #default="scope">
                        <span v-if="scope.row.checkdate"> {{scope.row.checkdate.replace('T',' ')}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="检验员" prop="checker" width="80"></el-table-column>
                    <el-table-column label="检验附件" prop="checkresultdocname" width="80" show-overflow-tooltip>
                      <template #default="scope">
                        <div v-if="scope.row.checkresultdocpath">
                          <el-link :href="scope.row.checkresultdocpath" target="_blank" type="primary">查看</el-link>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table>
                </el-tab-pane>
              </el-tabs>
            </el-col>
          </el-row>
        </el-col>

        <el-col :span="4">
          <el-tabs v-model="checkResultQRCodeObj.tabObj.inputZone">
            <el-tab-pane label="检测项二维码" name="inputZone">
              <div style="text-align: center;">
                <el-carousel indicator-position="outside" style="height: 216px;">
                  <el-carousel-item v-for="item in checkResultQRCodeObj.qrcodeList" :key="item" style="height: 216px;">
                    <h4 text="2xl" justify="center" style="margin:5px;padding:0px;">{{ item.containername }}</h4>
                    <img :src="item.image" alt="" style="height: 180px;">
                  </el-carousel-item>
                </el-carousel>
                <el-button type="primary" :size="'small'" :icon="'RefreshRight'" @click="getQRCodeListData">获取二维码
                </el-button>
                <!-- <el-button type="primary" :size="'small'" @click="generateQRCodeString">生成检测结果</el-button> -->
              </div>
            </el-tab-pane>
          </el-tabs>
          <el-tabs v-model="checkResultQRCodeObj.tabObj.uploadZone">
            <el-tab-pane label="检测结果扫码录入" name="uploadZone">
              <el-form :inline="true" @submit.prevent>
                <el-form-item label="扫码区">
                  <el-input placeholder="请扫码" @blur="addQRCodeScanResult"
                    v-model.trim="checkResultQRCodeObj.checkResult" @keyup.enter="addQRCodeScanResult">
                  </el-input>
                </el-form-item>
              </el-form>
              <el-table height="198" :data="checkResultQRCodeObj.checkItemResultScanList"
                ref="checkItemResultScanTableRef" stripe border>
                <el-table-column type="index" width="50"></el-table-column>
                <el-table-column type="selection" width="40"></el-table-column>
                <el-table-column label="扫码录入结果" prop="checkresult" show-overflow-tooltip></el-table-column>
              </el-table>
            </el-tab-pane>
          </el-tabs>
        </el-col>
      </el-row>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="success" :icon="'Check'" @click="checkResultQRCodeSubmit">提交</el-button>
          <el-button @click="checkResultQRCodeObj.dialogVisible = false" :icon="'Close'">关闭</el-button>
        </div>
      </template>
    </el-dialog>

    <!-- 理化或计量备注 对话框 -->
    <el-dialog v-model="checkEntrustObj.dialogVisible" title="理化或计量备注" width="60%" :draggable="true" align-center>
      <el-tabs v-model="checkEntrustObj.tabname">
        <el-tab-pane label="流水卡信息" name="first">
          <el-table height="500" :data="checkEntrustObj.dataList" stripe border ref="checkEntrustTableRef">
            <el-table-column type="index" width="50"></el-table-column>
            <el-table-column type="selection" width="40"></el-table-column>
            <el-table-column label="流水卡号" prop="containername" show-overflow-tooltip></el-table-column>
            <el-table-column label="批次id" prop="containerid" v-if="false"></el-table-column>
            <el-table-column label="在制数" prop="qty" width="80"></el-table-column>
            <el-table-column label="首检" prop="firstchecknum" width="60">
              <template #default="scope">
                {{scope.row.firstchecknum === 1 ? '是' : '否'}}
              </template>
            </el-table-column>
            <el-table-column label="工序检" prop="stepchecknum" width="80">
              <template #default="scope">
                {{scope.row.stepchecknum === 1 ? '是' : '否'}}
              </template>
            </el-table-column>
            <el-table-column label="当前工序" prop="workflowstepname" width="170" show-overflow-tooltip></el-table-column>
            <el-table-column label="工序id" prop="workflowstepid" v-if="false"></el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" :icon="'Check'" @click="handleCheckEntrustSubmitClick">提交</el-button>
          <el-button @click="checkEntrustObj.dialogVisible = false" :icon="'Close'">关闭</el-button>
        </div>
      </template>
    </el-dialog>
  </div>

  <script type="module">
    const { createApp, reactive, ref, toRef, toRefs, onMounted, watch, nextTick } = Vue
    const { ElMessage, ElLoading, ElMessageBox, ElNotification } = ElementPlus
    import { useFetch } from '../../../Scripts/hooks/useFetch.js';
    import { useGetUserInfo } from '../../../Scripts/hooks/useGetUserInfo.js';
    import { getParams } from '../../../Scripts/utils/common.js';
    import { usePageHeightSet } from '../../../Scripts/hooks/containercheck/usePageHeightSet.js';
    import { useCommon } from '../../../Scripts/hooks/useCommon.js';
    import { splitDate } from '../../../Scripts/utils/format.js';
    import { useFetchSuggestion } from '../../../Scripts/hooks/useFetchSuggestion.js';

    import { useFirstCheck } from '../../../Scripts/hooks/containercheck/useFirstCheck.js';
    import { useFinishCheck } from '../../../Scripts/hooks/containercheck/useFinishCheck.js';
    import { useDocumentView } from '../../../Scripts/hooks/containercheck/useDocumentView.js';
    import { useSurpassbill } from '../../../Scripts/hooks/containercheck/useSurpassbill.js';
    import { useEntrustMetering } from '../../../Scripts/hooks/containercheck/useEntrustMetering.js';
    import { useInstore } from '../../../Scripts/hooks/containercheck/useInstore.js';
    import { useRework } from '../../../Scripts/hooks/containercheck/useRework.js';
    import { useCheckSuspending } from '../../../Scripts/hooks/containercheck/useCheckSuspending.js';
    import { useInputCheckResult } from '../../../Scripts/hooks/containercheck/useInputCheckResult.js';
    import { useCheckResultQRCode } from '../../../Scripts/hooks/containercheck/useCheckResultQRCode.js';
    import { useCheckEntrust } from '../../../Scripts/hooks/containercheck/useCheckEntrust.js';

    const App = {
      setup() {
        const FetchCommonUrl = '../../../Ashx/FetchCommonHandler.ashx';
        const baseAPIUrl = '../../../Ashx/ContainerCheckVue3PageHandler.ashx';

        let currentTime = ref('');// 当前时间
        let pageDisabled = ref(false);
        const { userInfo, getUserInfo } = useGetUserInfo();
        // 页面布局高度配置
        const { uncheckTaskHeight, tableHeight, setHeight } = usePageHeightSet();

        const {
          factoryUserattributeList,// 分厂配置项列表
          getFactoryUserattributes,// 查询分厂配置项api接口方法
        } = useCommon();

        // 文档查看
        const { documentViewObj, getDocumentViewTreeData, getDocumentList, downloadFile } = useDocumentView();

        // 超越单
        const { surpassBillObj, getSurpassbillInfo } = useSurpassbill();

        // 输入建议
        const { fetchSuggestion } = useFetchSuggestion();

        // 首件检验
        const {
          firstCheckDialogVisible,
          lossInfoList,//表格数据
          checkObjInfo,
          initFirstCheckDialogData,//初始化对话框及赋值
          saveFirstCheckData,// 首件检验保存
          enableConfig: firstCheckInputEnableConfig,//文本框禁用配置项
          columns
        } = useFirstCheck();

        // 成品检验
        const {
          finishCheckDialogVisible,
          finishCheckSelectedContainerList,
          appearanceCheckList,//外观检查表格数据
          checkContentListRef,
          finishCheckDialogForm,
          finishCheckDialogCheckerList,//分厂检验员列表
          finishCheckLossInfoList,//报废品表格
          checkContentList,//检测内容表格数据
          initFinishCheckDialogData,
          finishCheckDialogAddCheckRows,//检测内容添加
          finishCheckDialogCheckRowsConfirm,//检测内容确认
          finishCheckDialogCheckRowsClear,//检测内容清空
          finishCheckDialogCheckerConfirm,//确认检验员
          saveFinishCheck,//保存成品检验
          finishCheckTableColumns,//表格列配置
        } = useFinishCheck()

        // 理化试验申请
        const {
          entrustMeteringObj,
          entrustMeteringTableRef,//检测项表格ref
          entrustMeteringFormRef,//表单ref
          entrustMeteringCheckItemMaintFormRef,//检测项维护表单ref
          options,//检测项目下拉框数据
          initEntrustMeteringDialogData,//初始化理化试验弹框数据
          handleEntrustMeteringSubmit,//【提交按钮】点击
          handleEntrustMeteringAddClick,//【添加】按钮点击
          handleEntrustMeteringDeleteClick,//【删除】按钮点击
          handleEntrustMeteringQtyBlur,//【委托数量】blur事件
          handleEntrustMeteringChecktypeChange,//【委托类型】change事件
        } = useEntrustMetering();

        // 入库
        const {
          instoreObj,
          instoreObjFormRef,
          instoreObjTableRef,
          byproductFormRef,//副产品维护表单ref
          instoreObjContainerTableRef,//单件单卡批次表格ref
          initInstoreDialogData,
          handleInstoreAddClick,
          handleInstoreDeleteClick,
          handleInstoreConfirmClick,//确认入库信息按钮
          handleInstoreSubmitClick,//【提交】按钮点击
          handleInstoreCellBlur,//批次表格单元格blur事件
        } = useInstore();

        // 返工返修
        const {
          reworkObj,
          initReworkDialogData,
          reworkObjFormRef,//表单ref
          reworkReasonFormRef,//返修原因维护表单ref
          reworkReasonTableRef,//返修原因维护表格ref
          handleReworkAddClick,//返修原因维护【添加】按钮点击
          handleReworkDeleteClick,//返修原因维护【删除】按钮点击
          handleReworkSubmitClick,//【提交】按钮点击
          resetReworkDialogData,//重置返修表单数据
        } = useRework();

        // 检验待处理
        const {
          checkSuspendingObj,
          checkSuspendingFormRef,//检验待处理表单ref引用
          initCheckSuspendingDialogData,//初始化检验待处理对话框数据
          handleCheckSuspendingSubmitClick,//检验待处理【提交】按钮点击
        } = useCheckSuspending();

        // 实测值录入
        const {
          inputCheckResultObj,
          initInputCheckResultDialogData,
          inputCheckResultDialogChildContainerRef,//子序号批次表格ref
          inputCheckResultDialogCheckItemTableRef,//检测项表格ref
          inputCheckResultDialogCheckResultTableRef,//检测项结果表格ref
          importCheckResultUploadRef,//检查项导入ref
          inputCheckResultDialogContainerTableRef,//批次表格ref
          handleCurrentChange,
          getStepCheckPointResult,//查询检测项录入结果
          saveCheckPointCheckerValue,//保存检验员录入的检测项
          deleteCheckPointResult,//删除检测项
          exportCheckPointResult,//导出检测项
          importCheckPointResult,//导入检测项
          handleCheckResultImportSuccess,//检测项导入成功事件
          checkItemRowClick,//检测项row点击事件
          copyWorkerInputValue,//一键确认（复制工人检测内容）
          sendToThreeCoordinateRecord,//推送三坐标
          fileUploadRef,//文件上传ref
          handleFileUploadSuccess,//文件上传成功事件
          uploadFileSubmit,//文件上传提交
        } = useInputCheckResult();

        // 实测值录入二维码
        const {
          checkResultQRCodeObj,
          initCheckResultQRCodeDialogData,
          checkResultQRCodeContainerRef,//[流水卡信息]表格ref
          checkResultQRCodeChildContainerRef,//子序号批次表格ref
          checkResultQRCodeCheckItemTableRef,//检测项表格ref
          checkResultQRCodeResultTableRef,//检测项结果表格ref
          checkResultQRCodeCheckItemTableRowClick,//检测项表格row点击事件
          getcheckResultQRCodeResultTableData, //查询检测项录入结果
          getQRCodeListData,//获取二维码
          checkResultQRCodeSubmit,//确认提交
          addQRCodeScanResult,
          checkItemResultScanTableRef,//扫码结果表格ref
          generateQRCodeString,
          checkResultQRCodeCurrentChange,
        } = useCheckResultQRCode();

        // 理化或计量备注
        const {
          checkEntrustObj,
          checkEntrustTableRef,
          initCheckEntrustDialogData,
          handleCheckEntrustSubmitClick
        } = useCheckEntrust();

        // 查询订单号
        function searchMfgorderAsync(value, callback) {
          fetchSuggestion({ url: FetchCommonUrl, method: 'getMfgordernameAsync', name: 'mfgordername', value, callback });
        }

        // 查询件号
        function searchProductAsync(value, callback) {
          fetchSuggestion({ url: FetchCommonUrl, method: 'getProductnameAsync', name: 'productname', value, callback });
        }

        // 查询批次号
        function searchContainerAsync(value, callback) {
          fetchSuggestion({ url: FetchCommonUrl, method: 'getContainernameAsync', name: 'containername', value, callback });
        }

        let unCheckContainerDataList = ref([]);//【待检任务】列表
        let unCheckContainerDataCount = ref(0);//【待检任务】总数
        let waitMoreThan2DaysDataList = ref([]);//【超2天未检验】列表
        let waitMoreThan2DaysDataCount = ref(0);//【超2天未检验】总数

        let selectedContainerListRef = ref();//页面右侧勾选的批次ref引用
        let selectedContainerList = ref([]);//页面右侧勾选的批次响应式数据

        let firstCheckDialogTitle = ref('');//工序检验、首件检验对话框标题

        // 勾选的批次信息
        let containerInfo = reactive({
          mfgordername: '',//订单号
          productdescription: '',//零件名称
          containertype: '',
          workflowid: '',
          containertypename: '',//批次卡类型
          togetherflag: '',//件号/批次号
          wipqty: '',//在制数
          mfgorderqty: '',//订单计划数
          specno: '',//当前工序号
          nowworkflowstepname: '',//当前工序
          plannedstartdate: '',//计划开始时间
          plannedfinishdate: '',//计划完成时间
          dispatchEmp: '',//派工人
          dispatchDate: '',//派工时间
          reportEmp: '',//报工人
          reportDate: '',//报工时间
          checkwaitdays: '',//检验等待时间
        });

        // 当前所选大批次信息
        let currentSelectContainer = {};

        // 扫卡信息
        let searchObj = reactive({ containername: '', productname: '', mfgordername: '', specno: '' });

        // 获取待检数据
        async function fetchUnCheckContainerData(checkerid) {
          const { data, status: { code, msg } } = await useFetch({
            url: `${baseAPIUrl}?actions=getUnCheckContainerData`,
            data: { type: 'getUnCheckContainerData', factoryid: userInfo.value.factoryid, checkerid, ...searchObj }
          });
          if (data.value.length === 0) {
            ElMessage({ type: 'warning', message: `未查询到数据`, grouping: true });
          }
          unCheckContainerDataList.value = data.value;
          unCheckContainerDataCount.value = data.value.length;
          waitMoreThan2DaysDataList.value = data.value.filter(i => i.checkwaitdays >= 2);
          waitMoreThan2DaysDataCount.value = data.value.filter(i => i.checkwaitdays >= 2).length;
        }

        async function menuSelect(key, keyPath) {
          const [munuName, productbatch, workflowstepid] = key.split('&');
          resetData();//先清空用户输入内容
          loadSelectMenuDetailData(munuName, productbatch, workflowstepid);
        }

        // 重置页面显示
        function resetData() {
          // 重置批次信息
          for (const key in containerInfo) {
            containerInfo[key] = '';
          }
          selectedContainerList.value = [];//清除批次表格数据
          currentSelectContainer = {};//当前所选大批次信息
        }

        async function loadSelectMenuDetailData(munuName, productbatch, workflowstepid) {
          const data = unCheckContainerDataList.value.filter(i => i.productbatch === productbatch && i.workflowstepid === workflowstepid)
          if (data.length == 0) { return; }

          // 缓存当前所选大批次信息
          Object.assign(currentSelectContainer, data[0]);

          const { mfgordername,
            zbjh: productdescription,
            containertypename, containertype, togetherflag, specno, workflowstepname,
            plannedstartdate, plannedcompletiondate: plannedfinishdate, checkwaitdays,
            wipqty, planqty
          } = data[0];
          containerInfo.mfgordername = mfgordername;
          containerInfo.productdescription = productdescription;
          containerInfo.containertypename = containertypename;
          containerInfo.containertype = containertype;
          containerInfo.togetherflag = togetherflag;
          containerInfo.wipqty = wipqty;//在制数
          containerInfo.mfgorderqty = planqty;//订单计划数
          containerInfo.specno = specno;
          containerInfo.nowworkflowstepname = workflowstepname;
          containerInfo.plannedstartdate = splitDate(plannedstartdate);
          containerInfo.plannedfinishdate = splitDate(plannedfinishdate);
          containerInfo.checkwaitdays = checkwaitdays;

          await fetchDispatchAndReportInfo(data[0]);//获取派工及报工信息
          await fetchUnCheckContainerDetail(data[0]);//获取待检验批次信息
        }

        // 获取派工及报工信息
        async function fetchDispatchAndReportInfo(containerData) {
          const { togetherflag, workflowstepid } = containerData;
          const { data, status: { code, msg } } = await useFetch({
            url: `${baseAPIUrl}?actions=getDispatchAndReportInfo`,
            data: {
              type: 'getDispatchAndReportInfo',
              togetherflag, workflowstepid
            }
          });
          if (data.value.length > 0) {
            const {
              dispatchemployeename: dispatchEmp,
              dispatchdate: dispatchDate,
              reportemployeename: reportEmp,
              reportdate: reportDate
            } = data.value[0];
            containerInfo.dispatchEmp = dispatchEmp;
            containerInfo.dispatchDate = splitDate(dispatchDate);
            containerInfo.reportEmp = reportEmp;
            containerInfo.reportDate = splitDate(reportDate);
          }
        }

        // 获取待检验批次信息
        async function fetchUnCheckContainerDetail(containerData) {
          const { containertype, togetherflag, productid, workflowstepid, mfgordername, workflowid } = containerData;
          const { data, status: { code, msg } } = await useFetch({
            url: `${baseAPIUrl}?actions=getUnCheckContainerDetail`,
            data: {
              type: 'getUnCheckContainerDetail',
              factoryid: userInfo.value.factoryid,
              checkerid: userInfo.value.employeeid,
              containertype, togetherflag, productid, workflowstepid, mfgordername, workflowid
            }
          });
          if (data.value.length === 0) {
            location.reload();
            return ElMessage({ type: 'error', message: `未查询到数据，页面将要自动刷新`, grouping: true });
          }
          selectedContainerList.value = data.value;
          // 默认只勾选搜索框所选择的批次
          if (searchObj.containername) {
            const row = selectedContainerList.value.filter(i => i.containername === searchObj.containername);
            if (row.length > 0) {
              await nextTick();// 等待 DOM 更新完成后
              selectedContainerListRef.value.toggleRowSelection(row[0], undefined);
            }
          } else {
            selectedContainerListRef.value.toggleAllSelection();//默认全选
          }
        }

        // 检索区域【流水卡号】失去焦点事件
        async function handleContainerBlur() {
          if (searchObj.containername) {
            await handleSearchBtnClick();
          }
        }

        // 查询按钮点击事件
        async function handleSearchBtnClick() {
          resetData();//先清空用户输入内容
          let checkerid = '';
          // 分厂存在【报工选择检验】配置项
          if (factoryUserattributeList.value.some(i => i.userattributename === '报工选择检验' && i.attributevalue === '是')) {
            checkerid = userInfo.value.employeeid;
          }
          await fetchUnCheckContainerData(checkerid);
        }

        // 模块1【首件检验】按钮点击
        async function handleFirstCheckClick() {
          const checkvalue = await validateData(1);
          if (checkvalue) {
            firstCheckDialogTitle.value = '首件检验';
            const selectionRows = selectedContainerListRef.value.getSelectionRows();
            initFirstCheckDialogData(currentSelectContainer, selectionRows, userInfo, factoryUserattributeList);
          }
        }

        // 模块2【工序检验】按钮点击
        async function handleSpecCheckClick() {
          const checkvalue = await validateData(2);
          if (checkvalue) {
            firstCheckDialogTitle.value = '工序检验';
            const selectionRows = selectedContainerListRef.value.getSelectionRows();
            initFirstCheckDialogData(currentSelectContainer, selectionRows, userInfo, factoryUserattributeList);
          }
        }

        // 模块3【完工检验】按钮点击
        async function handleFinishCheckClick() {
          const checkvalue = await validateData(2);
          if (checkvalue) {
            const selectionRows = selectedContainerListRef.value.getSelectionRows();
            initFinishCheckDialogData(currentSelectContainer, selectionRows, userInfo, factoryUserattributeList);
          }
        }

        // 模块4【理化试验申请】按钮点击
        async function handleEntrustMeteringClick() {
          const checkvalue = await validateData(5);
          if (checkvalue) {
            const selectionRows = selectedContainerListRef.value.getSelectionRows();
            initEntrustMeteringDialogData(currentSelectContainer, selectionRows, userInfo);
          }
        }

        // 模块5【返工返修】按钮点击
        async function handleReworkBtnClick() {
          const checkvalue = await validateData(0);
          if (checkvalue) {
            const selectionRows = selectedContainerListRef.value.getSelectionRows();
            initReworkDialogData(currentSelectContainer, selectionRows, userInfo, containerInfo);
          }
        }

        // 模块6【实测值录入】按钮点击
        function handleInputCheckPointResultClick() {
          const selectionRows = selectedContainerListRef.value.getSelectionRows();
          if (selectionRows.length === 0) {
            return ElMessage({ type: 'error', message: '请选择批次', grouping: true });
          }
          if (selectionRows.length >= 2) {
            return ElMessage({ type: 'error', message: '【实测值录入】只能选择单个批次进行操作', grouping: true });
          }
          initInputCheckResultDialogData(selectionRows, userInfo);
        }

        // 模块7【检验待处理】按钮点击
        async function handleContainerCheckSuspendingClick() {
          const checkvalue = await validateData(7);
          if (checkvalue) {
            const selectionRows = selectedContainerListRef.value.getSelectionRows();
            initCheckSuspendingDialogData(selectionRows, userInfo);
          }
        }

        // 模块8【超越单查看】按钮点击
        async function handleSurpassbillClick() {
          const selectedContainerList = selectedContainerListRef.value.getSelectionRows();
          if (selectedContainerList.length === 0) {
            return ElMessage({ type: 'error', message: `请选择批次`, grouping: true });
          }
          getSurpassbillInfo({ selectRows: selectedContainerList });
        }

        // 处理首件检验、工序检验【确认】按钮点击
        function handleFirstCheckSaveClick() {
          ElMessageBox
            .confirm(`确认要提交检验吗?`, '确认', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' })
            .then(async () => {
              const data = await saveFirstCheckData(userInfo);
              if (data.value) {
                ElMessage({ type: 'success', message: `检验成功`, grouping: true });
                firstCheckDialogVisible.value = false;
                location.reload();
              }
            })
            .catch(() => {
              ElMessage({ type: 'info', message: '已取消' });
            });
        }

        // 处理成品检验【完工】按钮点击
        function handleFinishCheckSaveClick() {
          ElMessageBox
            .confirm(`确认要提交检验吗?`, '确认', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' })
            .then(async () => {
              const { data, msg } = await saveFinishCheck(userInfo);
              if (data.value) {
                ElMessage({ type: 'success', message: `成品检验成功`, grouping: true });
                finishCheckDialogVisible.value = false;
                location.reload();
              } else {
                ElMessage({ type: 'error', message: msg, grouping: true });
              }
            })
            .catch(() => {
              ElMessage({ type: 'info', message: '已取消' });
            });
        }

        // 【完工并入库】按钮点击
        async function handleInstoreClick() {
          ElMessageBox
            .confirm(`确认要提交检验并入库吗?`, '确认', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' })
            .then(async () => {
              const { data, msg } = await saveFinishCheck(userInfo);
              if (data.value) {
                ElMessage({ type: 'success', message: `成品检验成功`, grouping: true });
                finishCheckDialogVisible.value = false;
                const selectionRows = selectedContainerListRef.value.getSelectionRows();
                initInstoreDialogData(currentSelectContainer, selectionRows, userInfo, factoryUserattributeList);
              } else {
                ElMessage({ type: 'error', message: msg, grouping: true });
              }
            })
            .catch(() => {
              ElMessage({ type: 'info', message: '已取消' });
            });
        }

        // 按钮点击事件统一校验
        async function validateData(checktype) {
          const selectionRows = selectedContainerListRef.value.getSelectionRows();
          if (selectionRows.length === 0) {
            ElMessage({ type: 'error', message: `请选批待检验的批次`, grouping: true });
            return false;
          }

          const { data: hasCheckPoint } = await useFetch({
            url: `${baseAPIUrl}?actions=isInputCheckPointResult`,
            data: { type: 'isInputCheckPointResult', postData: selectionRows }
          });
          if (!hasCheckPoint.value) {
            ElMessage({ type: 'error', message: `存在未录入的实测值，请点击实测值录入`, grouping: true });
            return false;
          }

          // 校验批次是否有效特殊过程
          const { data: isInvalidSpecialCheck, status: { msg: isInvalidSpecialCheckMsg } } = await useFetch({
            url: `${baseAPIUrl}?actions=isInvalidSpecialCheck`,
            data: { type: 'isInvalidSpecialCheck', postData: selectionRows, checkerid: userInfo.value.employeeid }
          });

          if (isInvalidSpecialCheck.value) {
            ElMessage({ type: 'error', message: `${isInvalidSpecialCheckMsg}`, grouping: true });
            return false;
          }

          // 校验批次是否暂停
          const { data, status: { msg } } = await useFetch({
            url: `${baseAPIUrl}?actions=checkContainerIsHold`,
            data: { type: 'checkContainerIsHold', postData: selectionRows }
          });

          if (data.value) {
            ElMessage({ type: 'error', message: `${msg}`, grouping: true });
            return false;
          }

          // checktype：0->返工返修
          if (checktype === 0 && selectionRows.length >= 2) {
            ElMessage({ type: 'error', message: `返工返修只能选择单个批次进行操作`, grouping: true });
            return false;
          }

          // checktype：1->首件检验
          if (checktype === 1) {
            const firstCheckRows = selectionRows.filter(i => i.firstchecknum === 1);
            if (firstCheckRows.length === 0) {
              ElMessage({ type: 'error', message: `所选批次不是【首检检验】待检的流水卡`, grouping: true });
              return false;
            }
          }

          // checktype：2->工序检，3->成品检验
          if (checktype === 2 || checktype === 3) {
            const firstCheckRows = selectionRows.filter(i => i.firstchecknum === 1);
            if (firstCheckRows.length > 0) {
              ElMessage({ type: 'error', message: `存在需要首检的待检流水卡`, grouping: true });
              return false;
            }
          }

          // checktype：4->不合格品审理
          if (checktype === 4 && selectionRows.length >= 2) {
            ElMessage({ type: 'error', message: `不合格品审理只能选择单个流水卡`, grouping: true });
            return false;
          }

          // checktype：5->委托计量
          if (checktype === 5 && selectionRows.length >= 2) {
            ElMessage({ type: 'error', message: `委托计量只能选择单个流水卡`, grouping: true });
            return false;
          }

          // checktype：6->实测值录入
          if (checktype === 6 && selectionRows.length >= 2) {
            ElMessage({ type: 'error', message: `实测值录入只能选择单个流水卡`, grouping: true });
            return false;
          }

          // checktype：7->待处理
          if (checktype === 7) {
            const nonconformingRows = selectionRows.filter(i => i.nonconformingnum);
            if (nonconformingRows.length > 0) {
              ElMessage({ type: 'error', message: `已有不合格审理的记录`, grouping: true });
              return false;
            }

            // 校验是否有委托计量或返工返修
            const { data, status: { msg } } = await useFetch({
              url: `${baseAPIUrl}?actions=isHavingReworkOrDelegate`,
              data: { type: 'isHavingReworkOrDelegate', postData: selectionRows }
            });

            if (data.value) {
              ElMessage({ type: 'error', message: `${msg}`, grouping: true });
              return false;
            }
          }

          // 校验是否有未审理的不合格品审理记录
          const { data: isHavingNonconforming, status: { msg: nonMsg } } = await useFetch({
            url: `${baseAPIUrl}?actions=isHavingNonconforming`,
            data: { type: 'isHavingNonconforming', postData: selectionRows }
          });

          if (isHavingNonconforming.value) {
            ElMessage({ type: 'error', message: `${nonMsg}`, grouping: true });
            return false;
          }

          // 全部校验通过返回true
          return true;
        }

        // 模块9【文档查看】按钮点击
        async function handleDocumentViewClick() {
          await getDocumentViewTreeData({ currentSelectContainer });
        };

        // 模块10：【流水卡查看】按钮点击
        function handleContainerViewClick() {
          handlePrint(1, '流水卡查看');
        }

        // 模块11：【工序执行检查】按钮点击
        async function handleWorkflowStepCheckClick() {
          handlePrint(2, '工序执行检查');
        }

        // 模块12：【实测值录入二维码】按钮点击
        function handleCheckPointQRCodeClick() {
          const selectionRows = selectedContainerListRef.value.getSelectionRows();
          if (selectionRows.length === 0) {
            return ElMessage({ type: 'error', message: `请选择批次`, grouping: true });
          }
          if (selectionRows.length >= 2) {
            return ElMessage({ type: 'error', message: '【实测值录入二维码】只能选择单个批次进行操作', grouping: true });
          }
          initCheckResultQRCodeDialogData(selectionRows, userInfo);
        }

        // 【文档查看】- 节点点击事件
        async function handleNodeClick(node) {
          await getDocumentList(node);
        };

        // 【文档查看】-【查看文档】按钮点击
        async function handleOpenDocumentClick(filepath) {
          await downloadFile(filepath);
        };

        // 流水卡打印--longb
        async function handlePrint(conPrintType, btnText) {
          const selectionRows = selectedContainerListRef.value.getSelectionRows();
          if (selectionRows.length === 0) {
            return ElMessage({ type: 'error', message: `请选择流水卡`, grouping: true });
          }

          ElMessageBox.confirm(`即将跳转并打开【${btnText}】页面，是否继续?`, '确认', { type: 'warning' }).then(async () => {
            let formData = new FormData();
            formData.append("action", "viewPrintPage");
            formData.append("conPrintType", conPrintType);
            formData.append("params", JSON.stringify(selectionRows))
            formData.append("isVue", 1);
            const { data, status: { code } } = await useFetch({
              url: `/InSiteWebApplication/Ashx/CommonHandler.ashx`,
              data: formData
            });
            if (code === 200) {
              window.open(data.value, '_blank')
            }
          }).catch(() => {
            ElMessage({ type: 'info', message: '已取消' });
          });
        }

        // 【理化或计量备注】
        function handleCheckEntrustClick() {
          const selectionRows = selectedContainerListRef.value.getSelectionRows();
          if (selectionRows.length === 0) {
            return ElMessage({ type: 'error', message: `请选择批次`, grouping: true });
          }
          initCheckEntrustDialogData(selectionRows);
        }

        // 页面声明周期钩子
        onMounted(async () => {
          let incrementNumber = () => {
            setTimeout(incrementNumber, 3000);
            currentTime.value = dayjs().format('YYYY年MM月DD日  HH:mm');
          }

          setTimeout(incrementNumber, 0);

          await nextTick(() => {
            const element = document.getElementById('btn-wrapper');
            const h = element.clientHeight;
            setHeight(h);
          });

          // 查询当前用户信息，绑定给响应式变量 userInfo
          const uid = getParams('uid');
          try {
            await getUserInfo({ url: `${FetchCommonUrl}`, method: 'getUserInfo', employeeid: Decrypt(uid) });
          } catch (error) {
            pageDisabled.value = true;
            return ElNotification({ title: '错误', message: '用户不存在', type: 'error', duration: 0, });
          }

          // 用户并不存在
          if (!userInfo.value.employeeid) {
            pageDisabled.value = true;
            return ElNotification({ title: '错误', message: '用户不存在', type: 'error', duration: 0, });
          }

          if (!userInfo.value.rolenames.includes('检验员')) {
            pageDisabled.value = true;
            return ElNotification({ title: '错误', message: '当前用户不是检验员', type: 'error', duration: 0, });
          }

          const { factorycode, factoryid, employeeid } = userInfo.value;

          // 查询分厂Userattribute
          await getFactoryUserattributes({ url: `${FetchCommonUrl}`, method: 'getFactoryUserattributes', factoryid });

          let checkerid = '';
          // 分厂存在【报工选择检验】配置项
          if (factoryUserattributeList.value.some(i => i.userattributename === '报工选择检验' && i.attributevalue === '是')) {
            checkerid = userInfo.value.employeeid;
          }
          await fetchUnCheckContainerData(checkerid);
        })

        // 返回给页面使用的数据
        return {
          currentTime,
          userInfo,//当前用户信息
          searchObj,
          pageDisabled,//

          uncheckTaskHeight, tableHeight,
          //查询订单号、查询件号、查询批次号
          searchMfgorderAsync, searchProductAsync, searchContainerAsync,

          unCheckContainerDataList, unCheckContainerDataCount, waitMoreThan2DaysDataList, waitMoreThan2DaysDataCount,
          containerInfo, //勾选的批次信息
          selectedContainerListRef, //页面右侧勾选的批次ref引用
          selectedContainerList,//页面右侧勾选的批次响应式数据
          menuSelect,
          firstCheckDialogTitle,//工序检验、首件检验对话框标题

          handleContainerBlur,

          handleFirstCheckClick, // 【首件检验】点击
          handleSpecCheckClick,// 【工序检验】点击
          handleFinishCheckClick,// 【完工检验】点击
          handleSearchBtnClick,//按钮点击事件
          handleFirstCheckSaveClick,//首件检验、工序检验【确认】按钮点击
          handleFinishCheckSaveClick,//成品检验【完工】按钮点击

          //首件检验
          firstCheckDialogVisible,
          lossInfoList,
          checkObjInfo,
          firstCheckInputEnableConfig,
          columns,//表格列

          // 成品检验
          finishCheckDialogVisible,
          finishCheckSelectedContainerList,
          finishCheckDialogForm,
          appearanceCheckList,//外观检查表格数据
          finishCheckDialogCheckerList,//分厂检验员列表
          finishCheckLossInfoList,//报废品表格
          checkContentList,//检测内容表格数据
          checkContentListRef,//检测内容表格ref引用
          finishCheckDialogAddCheckRows,//添加检验内容行
          finishCheckDialogCheckRowsConfirm,//检测内容行确认
          finishCheckDialogCheckRowsClear,//清空检测内容
          finishCheckDialogCheckerConfirm,//确认检验员
          saveFinishCheck,//保存成品检验
          finishCheckTableColumns,//表格列配置

          surpassBillObj,//【超越单查看】页面数据
          handleSurpassbillClick,//【超越单查看】按钮点击

          handleContainerViewClick,//流水卡查看【按钮】
          handleWorkflowStepCheckClick,//工序执行检查【按钮】

          documentViewObj,//【文档查看对象】
          handleDocumentViewClick,//【文档查看】按钮点击
          handleNodeClick,//【文档查看】- 节点点击事件
          handleOpenDocumentClick,//【文档查看】-【查看文档】按钮点击

          //理化试验申请
          handleEntrustMeteringClick,//【理化试验申请】按钮点击
          entrustMeteringObj,//理化试验申请
          entrustMeteringTableRef,//检测项表格ref
          entrustMeteringFormRef,//表单ref
          entrustMeteringCheckItemMaintFormRef,//检测项维护表单ref
          options,//检测项目下拉框数据
          handleEntrustMeteringSubmit,//理化试验申请【提交】
          handleEntrustMeteringAddClick,//【添加】按钮点击
          handleEntrustMeteringDeleteClick,//【删除】按钮点击
          handleEntrustMeteringQtyBlur,//【委托数量】blur事件
          handleEntrustMeteringChecktypeChange,//【委托类型】change事件

          //入库
          handleInstoreClick,
          instoreObj,
          instoreObjFormRef,
          instoreObjTableRef,
          byproductFormRef,//副产品维护表单ref
          instoreObjContainerTableRef,//单件单卡批次表格ref
          handleInstoreAddClick,
          handleInstoreDeleteClick,
          handleInstoreConfirmClick,//确认入库信息按钮
          handleInstoreSubmitClick,//【提交】按钮点击
          handleInstoreCellBlur,//批次表格单元格blur事件

          // 返工返修
          handleReworkBtnClick,
          reworkObj,
          reworkObjFormRef,//表单ref
          reworkReasonFormRef,//返修原因维护表单ref
          reworkReasonTableRef,//返修原因维护表格ref
          handleReworkAddClick,//返修原因维护【添加】按钮点击
          handleReworkDeleteClick,//返修原因维护【删除】按钮点击
          handleReworkSubmitClick,//【提交】按钮点击
          resetReworkDialogData,//重置返修表单数据

          // 检验待处理
          handleContainerCheckSuspendingClick,//检验待处理【按钮点击】
          checkSuspendingObj,
          checkSuspendingFormRef,//检验待处理表单ref引用
          initCheckSuspendingDialogData,//初始化检验待处理对话框数据
          handleCheckSuspendingSubmitClick,//检验待处理【提交】按钮点击

          // 实测值录入
          handleInputCheckPointResultClick,//【实测值录入】按钮
          inputCheckResultObj,
          initInputCheckResultDialogData,

          inputCheckResultDialogCheckItemTableRef,//检测项表格ref
          inputCheckResultDialogChildContainerRef,//子序号批次表格ref
          inputCheckResultDialogCheckResultTableRef,//检测项结果表格ref

          inputCheckResultDialogContainerTableRef,//批次表格ref
          handleCurrentChange,

          importCheckResultUploadRef,//检查项导入ref
          getStepCheckPointResult,//查询检测项录入结果
          saveCheckPointCheckerValue,//保存检测项
          deleteCheckPointResult,//删除检测项
          exportCheckPointResult,//导出检测项
          importCheckPointResult,//导入检测项
          handleCheckResultImportSuccess,//检测项导入成功事件
          checkItemRowClick,//检测项row点击事件
          copyWorkerInputValue,//一键确认（复制工人检测内容）
          sendToThreeCoordinateRecord,//推送三坐标
          fileUploadRef,//文件上传ref
          handleFileUploadSuccess,//文件上传成功事件
          uploadFileSubmit,//文件上传提交

          // 实测值录入二维码
          handleCheckPointQRCodeClick,//【实测值录入二维码】
          checkResultQRCodeObj,
          initCheckResultQRCodeDialogData,
          checkResultQRCodeContainerRef,//[流水卡信息]表格ref
          checkResultQRCodeChildContainerRef,//子序号批次表格ref
          checkResultQRCodeCheckItemTableRef,//检测项表格ref
          checkResultQRCodeResultTableRef,//检测项结果表格ref
          checkResultQRCodeCheckItemTableRowClick,//检测项表格row点击事件
          getcheckResultQRCodeResultTableData, //查询检测项录入结果
          getQRCodeListData,//获取二维码
          checkResultQRCodeSubmit,//确认提交
          addQRCodeScanResult,
          checkItemResultScanTableRef,//扫码结果表格ref
          generateQRCodeString,
          checkResultQRCodeCurrentChange,

          // 理化或计量备注
          handleCheckEntrustClick,
          checkEntrustObj,
          checkEntrustTableRef,//表格ref
          handleCheckEntrustSubmitClick,//提交按钮点击
        }
      }
    };

    const app = createApp(App);

    app.use(ElementPlus, {
      locale: ElementPlusLocaleZhCn,
    });

    // 注册所有icon
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      switch (key) {
        case "Switch":
          app.component('icon-switch', component)
          break;
        case "Picture":
          app.component('icon-picture', component)
          break;
        case "Filter":
          app.component('icon-filter', component)
          break;
        default:
          app.component(key, component)
          break;
      }
    }
    app.mount('#app');
  </script>
</body>

</html>